Contents
This article provides a reference for generating a StreamBase configuration file for
JMS and TIBCO EMS adapters, where the HOCON type is
com.tibco.ep.streambase.configuration.adapter
and the
root object is JMSAdapter
. Use this page for reference
for configuring the server connection and destination specifications for one or more
JMS or TIBCO EMS message servers.
Configuration files of this type can be edited as usual with the StreamBase Configuration File Editor. However, StreamBase Studio also provides a specialized JMS Configuration Editor dedicated to configuring this JMS and EMS configurations, which provides a forms-based way to edit the HOCON properties described in this article. The JMS Editor is invoked from the button of the Properties view of any JMS or EMS operator. See JMS and TIBCO EMS Configuration Editor for further details.
Because you will use the JMS Configuration Editor for most of your JMS and TIBCO EMS configuration work, this page serves as a reference for fields in the JMS Editor. Directly editing your JMSAdapter HOCON file is possible, but should be very rare.
Prior to StreamBase 10.3.0, JMS and EMS adapters were specified with a configuration
file named adapter-configurations.xml
which had to be
resident in the Studio project's src/main/resources
folder. While this XML file format is still supported, it is a best practice using a
HOCON configuration file instead.
Note
If a JMS adapter HOCON configuration file is included in your project in
src/main/configuration
, Studio ignores any
adapter-configurations.xml
file that may still be
present in the same project.
For more information on the Spotfire Streaming Adapter for JMS, see JMS Adapter.
Each configuration file must contain the following:
- name
-
Specifies an arbitrary, case-sensitive string to name this configuration, which must be unique among other files with the same type, if any. Configuration files can refer to each other by this name. Select a name that reminds you of this configuration's type and purpose. For example:
name = "JMSAdapter"
- version
-
Specifies an arbitrary version number that you can use to keep track of file versions for this configuration type in your development project. The maintenance of version numbers is under user control; StreamBase does not compare versions when loading configuration files during the fragment launch process. The version number is a string value, and can contain any combination of characters and numbers. For example:
version = "1.0.0"
- type
-
This essential setting specifies the unique HOCON configuration type described on this page.
type = "com.tibco.ep.streambase.configuration.adapter"
- configuration
-
This essential setting specifies the unique HOCON configuration type described on this page.
There is one root object in configuration files with type com.tibco.ep.streambase.configuration.adapter
that affects these
particular operators:
-
JMSAdapter
Note
The type com.tibco.ep.streambase.configuration.adapter
also contains an
additional root object, AdapterGroup
. For more
information see StreamBase
AdapterGroup Configuration.
The JMS and TIBCO EMS configuration schema is complex and multi-layered. However, remember that you will configure your JMS connections using the JMS Configuration Editor and will rarely need to edit a configuration file directly.
The exception is setting default entries with properties whose name begins with
default
. Those must be edited with the text
mode HOCON Editor.
In outline view, a JMS configuration file takes the following form:
name = "JMSAdapter" version = "1.0.0" type = "com.tibco.ep.streambase.configuration.adapter" configuration = { JMSAdapter = { jmsServers = {YourServerName
= { [properties forYourServerName
] destinations = {dest1
= { [properties fordest1
onYourServerName
] }dest2
= { [properties fordest2
onYourServerName
] }...
[possibly more destinations defined] } defaultDestination = { [default properties for destinations onYourServerName
] } [further properties for YourServerName. The JMS Editor usually alphabetizes object and property names. Thus, many server properties might be found after the "destinations" objects.] }AnotherServerName
= { [properties, objects, and destinations for this second server] }FurtherServers
= {...} ... } [The next four objects each define a set of named features that can be referenced elsewhere in the configuration. Of these four, only timeStampFormats is recommended for current use, and is the only one supported by the JMS Editor. Instead of the three map settings here, current best practice is to follow your EMS or JMS component on the canvas with a Map operator that performs the desired mapping there.] fieldMaps = { ... } jmsHeaderFieldMaps = { ... } jmsPropertyMaps = { ... } timeStampFormats = { ... } [The properties whose names begin with "default" specify default settings. Default properties are not supported by the JMS Editor and can only be specified by editing the jmsAdapter.conf file in text mode with the StreamBase HOCON Configuration Editor. The defaults at this level, parallel to the jmsServers object, apply to all destinations defined in this configuration file.] jmsServerDefaults = { [In this object, specify defaults that are to apply to all servers defined in this configuration file.] ... } defaultTimeStampFormat = "tsFormat2" ... [Defaults at this level (parallel to the jmsServers object above) apply throughout this configuration file, to destinations as well as servers.] } }
This section shows the subordinate objects, properties, usage, and syntax for the
JMSAdapter root object. Throughout, the terms JMS
and TIBCO
EMS
apply interchangeably to each other's services. In general, we use
JMS
for its brevity, but show sample
configuration lines for a TIBCO EMS server.
- JMSAdapter
-
Required root object for a Spotfire Streaming JMS adapter configuration.
- associatedWithEngines
-
If you want to restrict this object to be associated with specific engines, do so here. Each array value can be a specific engine name or a regular expression that applies to more than one engine. This array is optional and has no default value. If not present, the configuration is associated with all engines. This is a property of the JMSAdapter root object, and thereby applies to all JMS or EMS connections configured in the same file.
For example:
associatedWithEngines = [ "javaengine", "otherengine[0-9]" ]
- adapterClassName
-
Fully qualified class name of the adapter. This property is optional and has no default value.
For example:
adapterClassName = "com.streambase.sb.adapter.jms.enqueue.JMSReader"
- jmsServers
-
A top-level object that groups together one or more JMS or EMS server configurations used by this adapter to subscribe to messages from those message buses. This object is required and must contain at least one server configuration.
For example:
jmsServers = {
YourServerName
= { ...-
YourServerName
-
String. A user-assigned name for a single TIBCO EMS or JMS server. The name you assign for this object:
shows up in the dropdown list in the Properties view for any of the JMS or EMS operators:
- description
-
Description of this JMS server. This property is optional and has no default value. For example:
description = "EMS server in the QA Lab, connects using JNDI"
- providerName
-
The name of the JMS provider running this server, such as
TIBCO EMS
orApache ActiveMQ
. This property is optional and has no default value. However, the value for providerName is usually selected from a drop-down list in the JMS Editor that offers the following list of JMS provider vendors supported with different Spotfire Streaming adapters:TIBCO EMS
Apache ActiveMQ
IBM WebSphere Application Server Default JMS
Solace
Other
You cannot mix TIBCO EMS and other JMS providers. That is, if you have specified a providerContextFactoryClassName property for
TibjmsInitialContextFactory
, you must selectTIBCO EMS
and cannot select the name of an alternate JMS providers.providerName = "TIBCO EMS"
- providerURL
-
String. The naming provider URL, as used by
javax.naming.Context.PROVIDER_URL
. The exact URL format depends on the provider. This property is required if connecting using JNDI.For example:
providerURL = "tibjmsnaming://localhost:7222" providerURL =
- providerContextFactoryClassName
-
String. Class name to use as a value for
javax.naming.Context.INITIAL_CONTEXT_FACTORY
. This parameter is required if connecting using JNDI.For example:
providerContextFactoryClassName = "com.tibco.tibjms.naming.TibjmsInitialContextFactory"
- connectionFactoryName
-
String. The name of a connection factory to be looked up by name via a JNDI lookup. This is then used to construct the connection object. This property is required if connecting using JNDI.
For example:
connectionFactoryName = "ConnectionFactory"
- destinations
-
An object containing a set of one or more named destinations. This object is optional and has no default value.
For example:
destinations = {
dest1
= { ... } }-
dest1
-
Example of a destination.
- destinationType
-
Whether this destination is a topic or a queue. This object is optional and is TOPIC if the adapter default use-topics setting is true. Otherwise, set to QUEUE.
For example:
destinationType = "TOPIC"
- messageSelector
-
String. The message selector expression (if any) to use for this destination. Syntax is defined by the JMS specification, and is a subset of the SQL92 conditional expression syntax. This property is optional and has no default value.
For example:
messageSelector = "selector1"
- fieldMap
-
String. The field map used for this destination. If specified, the name map must exist in the adapter
fieldMaps
associative object. This property is optional and defaults to the adapter default field map name. See the Usage Note at the fieldMaps object before deciding to use this feature.For example:
fieldMap = "fieldMap1"
- jmsHeaderFieldMap
-
String. The header field map used for this destination. If specified, the header field map must exist in the adapter
jmsHeaderFieldMaps
associative object. This property is optional and defaults to the adapter default JMS header field map name. See the Usage Note at the fieldMaps object before deciding to use this feature.For example:
jmsHeaderFieldMap = "headerFieldMap1"
- jmsPropertyMap
-
String. The property map used for this destination. If specified, the property map must exist in the adapter
jmsPropertyMaps
associative object. This property is optional and defaults to the adapter default JMS property map name. See the Usage Note at the fieldMaps object before deciding to use this feature.For example:
jmsPropertyMap = "propertyMap1"
- timeStampFormat
-
String. The string format used by time stamp fields delivered by this destination. The timestamp's format name must exist in the adapter
timeStampFormats
associative object. This property is optional and defaults to the adapter default timestamp format name.For example:
timeStampFormat = "tsFormat1"
- deliveryTimeField
-
String. The field on the StreamBase tuple that is marked with the delivery time. This property is optional and defaults to the adapter default delivery time field.
For example:
deliveryTimeField = "delivery-time-field-1"
- messageToTupleConverterClassName
-
String. Name of the class used to translate JMS messages to StreamBase tuples. This property is optional and defaults to the adapter default message-to-tuple converter name.
For example:
messageToTupleConverterClassName = "com.tibco.converter1"
- tupleToMessageConverterClassName
-
String. Name of the class used to translate StreamBase tuples to JMS messages. This property is optional and defaults to the adapter default tuple-to-message converter name.
For example:
tupleToMessageConverterClassName = "com.tibco.deconverter1"
- messageToTupleConverterCustomSettings
-
This is a string that is passed verbatim to the specified message-to-tuple-converter class instance. It allows implementers to pass arbitrary values to their converter. The implementing converter code is the sole entity responsible for parsing and interpreting this string. This property is optional and defaults to the adapter default converter custom settings value.
For example:
messageToTupleConverterCustomSettings = "converter 1 custom settings"
- acknowledgeMode
-
The mode that is used to acknowledge JMS messages. Use one of the following values: AUTO_ACKNOWLEDGE, CLIENT_OK_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, INDIVIDUAL_ACKNOWLEDGE, NO_ACKNOWLEDGE.
This property is optional and defaults to the owning JMS server's acknowledge mode.
For example:
acknowledgeMode = "AUTO_ACKNOWLEDGE"
- deliveryMode
-
The default delivery mode used when sending messages to JMS, if the destination does not specify a delivery mode. Use one of the following values: PERSISTENT, NON_PERSISTENT, RELIABLE_DELIVERY. This last delivery mode is specific to TIBCO EMS; using this value with any other JMS server may result in an error.
This property is optional and its default value is the value of the
defaultDeliveryMode
value in the default JMS server settings section.For example:
deliveryMode = "PERSISTENT"
- timeToLiveMilliseconds
-
Integer. The length of time in milliseconds from its dispatch time that a produced message should be retained by the message system. A time-to-live of zero means no time limit. Values less than zero are not allowed. This property is optional and its default value is the value of the
defaultTimeToLiveMilliseconds
value in the default JMS server settings section.For example:
timeToLiveMilliseconds = 123
- priority
-
Integer. The message priority level (0-9), as defined by the JMS specification. This property is optional and its default value is the value of the
defaultPriority
value in the default JMS server settings section.For example:
priority = 5
- disableMessageID
-
Boolean. Sets whether message IDs are disabled. This property is optional and its default value is the value of the
defaultDisableMessageID
value in the default JMS server settings section.For example:
disableMessageID = true
- disableMessageTimeStamp
-
Boolean. Sets whether message timestamps are disabled. This property is optional and its default value is the value of the
defaultDisableMessageID
value in the default JMS server settings section.For example:
disableMessageTimeStamp = true
- isTemporaryDestination
-
Boolean. Sets whether message timestamps are disabled. This property is optional and its default value is the value of the
defaultDisableMessageID
value in the default JMS server settings section.For example:
isTemporaryDestination = false
-
- defaultDestination
-
In addition to explicit destination definitions handled by the destination tags, you can specify a default destination (that is, when the JMS server's
createDestinations
property is set to true).This property is optional and has no default value. For example:
defaultDestination = { ...
- acknowledgeMode
-
The mode used to acknowledge JMS messages, which must be one of the following values: AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, NO_ACKNOWLEDGE. Note this adapter does not support the JMS specification's CLIENT_ACKNOWLEDGE.
This property is optional and its default value is AUTO_ACKNOWLEDGE. For example:
acknowledgeMode = "AUTO_ACKNOWLEDGE"
- createDestinations
-
Boolean. Whether destinations should be created or looked up in JNDI. If supported by the JMS provider, destinations can be created even if they exist. Creating destinations is faster than looking them up in JNDI. This property is optional and its default value is true.
For example:
createDestinations = false
- useTopics
-
Boolean. If this attribute is true, then destinations will be treated as Topics, otherwise they will be treated as Queues. This property is optional and its default value is true. For example:
useTopics = false
- cacheDestinations
-
Boolean. Sets whether destinations should be cached once created. The value
true
offers better performance. However, if you are creating thousands of destinations caching them may adversely affect your memory footprint. This property is optional and its default value is true.For example:
cacheDestinations = false
- userName
-
String. The user name to use when connecting to JMS. This property is optional and has no default value. For example:
userName = "user1"
- password
-
String. The password to use when connecting to JMS. This property is encryptable as part of node-level secrecy system described in Encrypting Sensitive Configuration Data. This property is optional and has no default value.
For example:
password = "secret1"
- clientID
-
String. If desired, you can set a specific clientID value on the connection. This property is optional and its default value is the value of the
defaultClientID
value in the default JMS server settings section.For example:
clientID = "client-id-1"
- subscriberName
-
String. If specified, causes a durable subscription to be made and used with the specified subscriber name. Valid only when used in conjunction with destinations that are Topics. This property is optional its default value is the value of the
defaultSubscriberName
value in the default JMS server settings section.For example:
subscriberName = "subscriber-1"
- maxReconnectAttempts
-
Integer. In the event of a connection failure, this sets the number of reconnection attempts. 0 means no attempt will be made; negative values are not allowed. This property is optional and its default value is the value of the
defaultMaxReconnectAttempts
value in the default JMS server settings section.For example:
maxReconnectAttempts = 5
- reconnectSleepSeconds
-
Integer. The number of seconds to wait between reconnection attempts. Values less than or equal to zero are not allowed. This property is optional and its default value is the value of the
defaultReconnectSleepSeconds
value in the default JMS server settings section.For example:
reconnectSleepSeconds = 3
- destinationMonitorIntervalMilliseconds
-
Integer. The number of milliseconds to wait between attempts to monitor the health of subscribed destinations on this server. A value of 0 indicates no monitoring should be attempted, and so the StreamBase application will never be notified of availability or unavailability of destinations on this server.
Negative values are not allowed. This property is optional its default value is the value of the
defaultDestinationMonitorIntervalMilliseconds
value in the default JMS server settings section.For example:
destinationMonitorIntervalMilliseconds = 50000
- jndiSecurityPrincipal
-
String. Setup for the JNDI InitialContext object. Corresponds to
javax.naming.Context.SECURITY_PRINCIPAL
. This property is optional and its default value is the value of thedefaultJNDISecurityPrincipal
value in the default JMS server settings section.For example:
jndiSecurityPrincipal = "security-principal"
- jndiSecurityCredentials
-
String. Setup for the JNDI InitialContext object. Corresponds to
javax.naming.Context.SECURITY_CREDENTIALS
. This property is optional its default value is the value of thedefaultJNDISecurityCredentials
value in the default JMS server settings section.For example:
jndiSecurityCredentials = "security-credentials"
- jndiSecurityAuthentication
-
String. Setup for the JNDI InitialContext object. Corresponds to
javax.naming.Context.SECURITY_AUTHENTICATION
. This property is optional and its default value is the value of thedefaultJNDISecurityAuthentication
value in the default JMS server settings section.For example:
jndiSecurityAuthentication = "security-auth"
- jndiSecurityProtocol
-
String. Setup for the JNDI InitialContext object. Corresponds to
javax.naming.Context.SECURITY_PRINCIPAL
. This property is optional its default value is the value of thedefaultJNDISecurityProtocol
value in the default JMS server settings section.For example:
jndiSecurityProtocol = "security-protocol"
- jndiAuthoritative
-
Boolean. Setup for the JNDI InitialContext object. Corresponds to
javax.naming.Context.AUTHORITATIVE
. This property is optional its default value is the value of thedefaultJNDIAuthoritative
value in the default JMS server settings section.For example:
jndiAuthoritative = true
- jndiDNSURL
-
String. Setup for the JNDI InitialContext object. Corresponds to
javax.naming.Context.DNS_URL
. This property is optional its default value is the value of thedefaultJNDIDNSURL
value in the default JMS server settings section.For example:
jndiDNSURL = "jndi-dns-url"
- jndiReferral
-
String. Setup for the JNDI InitialContext object. Corresponds to
javax.naming.Context.REFERRAL
. This property is optional its default value is the value of thedefaultJNDIReferral
value in the default JMS server settings section.For example:
jndiReferral = "jndi-referral"
- jndiConnectionBuilderClassName
-
String. Fully qualified name of the Java class implementing
com.streambase.sb.adapter.common.jms.common.JNDIInitialContextBuilder
, which is responsible for creating the JNDI InitialContext object based on the settings described here.For example:
jndiConnectionBuilderClassName = "com.company.connection.Builder"
- jndiInitialContextBuilderClassName
-
String. Fully qualified name of the Java class implementing
com.streambase.sb.adapter.common.jms.common.JNDIInitialContextBuilder
, which is responsible for creating the JNDI InitialContext object based on the settings described here. This property is optional its default value is the value of thedefaultJNDIInitialContextBuilderClassName
value in the default JMS server settings section.For example:
jndiInitialContextBuilderClassName = "com.company.initial. context.Builder"
- jndiExtraProperties
-
An associative string array that defines additional properties that may be required beyond those defined in javax.naming.Context. This object is optional its default value is the value of the
defaultJNDIExtraProperties
value in the default JMS server settings section. For example:jndiExtraProperties = { prop1 = "val1" prop2 = "val2"
- customSettings
-
String. An arbitrary string passed verbatim to the implementer of the
CustomConnectionBuilder
interface (see the connection-builder field). This property is optional its default value is the value of the defaultJMSServerCustomSettings value in the default JMS server settings section. For example:customSettings = "an arbitrary string passed verbatim to the implementer of the CustomConnectionBuilder interface"
-
- fieldMaps
-
Specifies one or more maps of JMS message fields with their corresponding StreamBase tuple field. By default, this adapter matches JMS fields with StreamBase fields when they share the same name. This behavior can be overridden with a field map, which associate a JMS field and a StreamBase field when they do not share the same name.
Each configured destination can use a different field map, specified here with different field map names. This object is optional and has no default value. For example:
fieldMaps = {
mapForDest1
= {jmsField1
= "sbField1
"jmsField2
= "sbField2
" } mapForDest2 = {jmsFieldA
=sbFieldA
} }Usage Note
The JMS Configuration Editor does not support adding or editing the fieldMaps, jmsHeaderFieldMaps, or jmsPropertyMaps objects in your JMS configuration file. Best practice is to follow your EMS or JMS icon with a Map component that performs the desired mapping operations after each JMS message is received.
- jmsHeaderFieldMaps
-
An associative array of header maps. A JMS message is delivered with a set of standard JMS header fields. You can map header fields to StreamBase fields using a JMS header field map. Each configured destination can use a different header field map. Header field maps are named and are referred to by name. This object is optional and has no default value. For example:
jmsHeaderFieldMaps = {
headerFieldMap1
= {jms-headerField-Field1
= "sbField5
"jms-headerField-Field2
= "sbField6
" } - jmsPropertyMaps
-
An associative array of property maps. Either a JMS provider or a message creator can add properties to a JMS message. Think of properties as provider or user-defined headers. As with headers, you use a map to associate a property with a StreamBase field. A mapping associates a JMS property with a StreamBase field, which writes the property value to the StreamBase field.
Each configured destination can use a different property map. Property maps are named and are referred to by name. This name value pair is optional and has no default value. For example:
jmsPropertyMaps = {
propertyMap1
= {jms-property1
= "sbField9
"jms-property2
= "sbField10
" } - timeStampFormats
-
A set of named timestamp formats. Fields, properties or headers delivered in a JMS message may represent timestamps, but they may not be in the same format as the StreamBase timestamp data type. A named entry in the timeStampFormats object can be used when a JMS field, header, or property delivers a timestamp that is represented as a string. Use the timestamp format to specify the format of the string so that it can be translated to the StreamBase timestamp data type.
You can specify a set of timestamp formats so that each configured destination can use a different timestamp format. Timestamp formats are named and are referred to by name. The format of StreamBase timestamps is defined in
java.util.SimpleDate
. This object is optional and has no default value.For example:
timeStampFormats = {
tsFormat1
= "format1
"tsFormat2
= "format2
" }
The following object and properties establish defaults that the adapter is to use when a new server, new destination, or new client configuration is added to a configuration file. These settings can only be edited in the text-based HOCON Configuration File Editor, no in the JMS Editor.
- jmsServerDefaults
-
This object defines a collection of default settings that are used when a corresponding JMS server setting is not specified for a particular server. This object is optional and has no default value. For example:
jmsServerDefaults = { ... }
- defaultClientID
-
String. Default JMS server client ID. This property is optional and has no default value.
For example:
defaultClientID = "
a-default-client-ID
" - defaultSubscriberName
-
String. Default JMS server subscriber name. This property is optional and has no default value.
For example:
defaultSubscriberName = "a-default-subscriber-name"
- defaultMaxReconnectAttempts
-
Integer. Default maximum number of reconnect attempts. This property is optional and has no default value.
For example:
defaultMaxReconnectAttempts = 10
- defaultReconnectSleepSeconds
-
Integer. Default number of seconds to wait between reconnection attempts. This property is optional and has default value 30 seconds.
For example:
defaultReconnectSleepSeconds = 5
- defaultDestinationMonitorIntervalMilliseconds
-
Integer. Default destination monitoring interval. This property is optional and has default value zero, meaning no monitoring.
For example:
defaultDestinationMonitorIntervalMilliseconds = 10000
- defaultJNDISecurityPrincipal
-
String. Default JNDI security principal. This property is optional and has no default value. For example:
defaultJNDISecurityPrincipal = "default-jndi-security-principal"
- defaultJNDISecurityCredentials
-
String. Default JNDI security credentials. This property is optional and has no default value. For example:
defaultJNDISecurityCredentials = "default-jndi-security-credentials"
- defaultJNDISecurityAuthentication
-
String. Default JNDI security authentication. This property is optional and has no default value. For example:
defaultJNDISecurityAuthentication = "default-jndi-security-authentication"
- defaultJNDIDNSURL
-
String. Default JNDI DNS URL. This property is optional and its default value is false.
For example:
defaultJNDIDNSURL = "default-jndi-dns-url"
- defaultJNDIReferral
-
String. Default JNDI referral setting. This property is optional and has no default value.
For example:
defaultJNDIReferral = "default-jndi-referral"
- defaultJNDIConnectionBuilderClassName
-
String. Default JNDI connection builder class name. This property is optional and has no default value.
For example:
defaultJNDIConnectionBuilderClassName = "default.jndi.connection. builder.class.name"
- defaultJNDIInitialContextBuilderClassName
-
Default initial context builder class name. This property is optional and has no default value.
For example:
defaultJNDIInitialContextBuilderClassName = "default.jndi.initial. context.builder.class.name"
- defaultJNDIExtraProperties
-
String. Default properties passed to the JNDI naming context. This property is optional and has no default value.
For example:
defaultJNDIExtraProperties = { name1 = "val1" name2 = "val2" }
- defaultJMSServerCustomSettings
-
Default custom settings for a custom connection builder. This property is optional and has no default value. For example:
defaultJMSServerCustomSettings = "Default custom settings for a custom connection builder"
- defaultFieldMap
-
String. Optionally, specify a default for convenience, if many destinations use the same field map. However, see the Usage Note for the fieldMaps object. For example:
defaultFieldMap = "fieldMap1"
- defaultJMSHeaderFieldMap
-
String. Optionally, specify a default for convenience, if many destinations use the same header field map. However, see the Usage Note for the fieldMaps object. For example:
defaultJMSHeaderFieldMap = "headerFieldMap2"
- defaultJMSPropertyMap
-
String. Optionally, specify a default for convenience, if many destinations use the same property map. However, see the Usage Note for the fieldMaps object. For example:
defaultJMSPropertyMap = "propertyMap1"
- defaultTimeStampFormat
-
String. If many destinations use the same time stamp format, it may be convenient to specify a default. For example:
defaultTimeStampFormat = "tsFormat2"
- defaultDeliveryTimeField
-
String. Optionally, specify a default for convenience, if many destinations use the same delivery time field. For example:
defaultDeliveryTimeField = "myDeliveryTimeField"
- defaultMessageToTupleConverterClassName
-
String. Optionally, specify a default for convenience, if many destinations use the same message-to-tuple converter class. For example:
defaultMessageToTupleConverterClassName = "com.tibco.myMessageToTupleConverter"
- defaultTupleToMessageConverterClassName
-
String. Optionally, specify a default for convenience, if many destinations use the same tuple-to-message converter class. For example:
defaultTupleToMessageConverterClassName = "com.tibco.myTupleToMessageConverter"
- defaultMessageToTupleConverterCustomSettings
-
String. Optionally, specify a default for convenience, if many destinations use the same message-to-tuple custom settings. For example:
defaultMessageToTupleConverterCustomSettings = "a default converter settings string"
- defaultDeliveryMode
-
The default delivery mode used when sending messages to JMS, if the destination does not specify a delivery mode. You must use one of the following values: PERSISTENT, NON_PERSISTENT, RELIABLE_DELIVERY. This last delivery mode is specific to TIBCO EMS; using this value with any other JMS server may result in an error.
This value is passed directly to
javax.jms.MessageProducer.setDeliveryMode()
. This property is optional and its default value is NON_PERSISTENT.For example:
defaultDeliveryMode = "NON_PERSISTENT"
- defaultTimeToLiveMilliseconds
-
String. Optionally, specify a default for convenience, if many destinations have the same time-to-live requirement. For example:
defaultTimeToLiveMilliseconds = 333
- defaultPriority
-
Integer. Optionally, specify a default for convenience if many destinations use the same
Destination.priority
. This property is optional and has default value of 4, per the JMS specification.For example:
defaultPriority = 1
- defaultDisableMessageID
-
Boolean. Optionally, specify a default for convenience, if many destinations use the same ID disable setting. For example:
defaultDisableMessageID = false
- defaultDisableMessageTimeStamp
-
Boolean. Optionally, specify a default for convenience, if many destinations use the time stamp disable setting setting. For example:
defaultDisableMessageTimeStamp = false
The following is an example of the com.tibco.ep.streambase.configuration.adapter type with the JMSAdapter root object.
name = "sample-JMSAdapter" version = "1.0.0" type = "com.tibco.ep.streambase.configuration.adapter" configuration = { JMSAdapter = { adapterClassName = "com.streambase.sb.adapter.jms.enqueue.JMSReader" jmsServers = {YourServerName
= { description = "sample server, connects using JNDI" providerName = "TIBCO EMS" providerContextFactoryClassName = "com.tibco.tibjms.naming.TibjmsInitialContextFactory" providerURL = "tibjmsnaming://localhost:7222" connectionFactoryName = "ConnectionFactory" destinations = { dest1 = { destinationType = "TOPIC" messageSelector = "selector1" fieldMap = "fieldMap1" jmsHeaderFieldMap = "headerFieldMap1" jmsPropertyMap = "propertyMap1" timeStampFormat = "tsFormat1" deliveryTimeField = "delivery-time-field-1" messageToTupleConverterClassName = "com.tibco.converter1" tupleToMessageConverterClassName = "com.tibco.deconverter1" messageToTupleConverterCustomSettings = "converter 1 custom settings" acknowledgeMode = "AUTO_ACKNOWLEDGE" deliveryMode = "PERSISTENT" timeToLiveMilliseconds = 123 priority = 5 disableMessageID = true disableMessageTimeStamp = true isTemporaryDestination = false } dest2 = { destinationType = "QUEUE" messageSelector = "selector2" fieldMap = "fieldMap2" jmsHeaderFieldMap = "headerFieldMap2" jmsPropertyMap = "propertyMap2" timeStampFormat = "tsFormat2" deliveryTimeField = "delivery-time-field-2" messageToTupleConverterClassName = "com.tibco.converter2" tupleToMessageConverterClassName = "com.tibco.deconverter2" messageToTupleConverterCustomSettings = "converter 2 custom settings" } } defaultDestination = { destinationType = "QUEUE" messageSelector = "defaultSelector" fieldMap = "fieldMap1" jmsHeaderFieldMap = "headerFieldMap1" jmsPropertyMap = "propertyMap1" timeStampFormat = "tsFormat1" deliveryTimeField = "delivery-time-field-1" messageToTupleConverterClassName = "com.tibco.defaultConverter" tupleToMessageConverterClassName = "com.tibco.defaultDeconverter" messageToTupleConverterCustomSettings = "default converter custom settings" deliveryMode = "RELIABLE_DELIVERY" timeToLiveMilliseconds = 321 priority = 4 disableMessageID = false disableMessageTimeStamp = false isTemporaryDestination = false } acknowledgeMode = "AUTO_ACKNOWLEDGE" createDestinations = false useTopics = false cacheDestinations = false userName = "user1" password = "secret1" clientID = "client-id-1" subscriberName = "subscriber-1" maxReconnectAttempts = 5 reconnectSleepSeconds = 3 destinationMonitorIntervalMilliseconds = 50000 jndiSecurityPrincipal = "security-principal" jndiSecurityCredentials = "security-credentials" jndiSecurityAuthentication = "security-auth" jndiSecurityProtocol = "security-protocol" jndiAuthoritative = true jndiDNSURL = "jndi-dns-url" jndiReferral = "jndi-referral" jndiConnectionBuilderClassName = "com.company.connection.Builder" jndiInitialContextBuilderClassName = "com.company.initial.context.Builder" jndiExtraProperties = { prop1 = "val1" prop2 = "val2" } customSettings = "an arbitrary string passed verbatim to the implementer of the CustomConnectionBuilder interface" }AnotherServerName
= { description = "Sample ActiveMQ Server" providerName = "Apache ActiveMQ" connectionFactoryClassName = "org.apache.activemq.jndi.ActiveMQInitialContextFactory" connectionFactoryURL = "tcp://localhost:61616" acknowledgeMode = "DUPS_OK_ACKNOWLEDGE" createDestinations = true useTopics = true cacheDestinations = true userName = "user2" password = "secret2" clientID = "client-id-2" subscriberName = "subscriber-2" maxReconnectAttempts = 10 reconnectSleepSeconds = 5 destinationMonitorIntervalMilliseconds = 25000 } } fieldMaps = {mapForDest1
= {jmsField1
= "sbField1
"jmsField2
= "sbField2
" } mapForDest2 = {jmsFieldA
=sbFieldA
} } jmsHeaderFieldMaps = { headerFieldMap1 = { jms-headerField-Field1 = "sbField5" jms-headerField-Field2 = "sbField6" } headerFieldMap2 = { jms-headerField-Field3 = "sbField7" jms-headerField-Field4 = "sbField8" } } jmsPropertyMaps = { propertyMap1 = { jms-property1 = "sbField9" jms-property2 = "sbField10" } propertyMap2 = { jms-property3 = "sbField11" jms-property4 = "sbField12" } } timeStampFormats = { tsFormat1 = "format1" tsFormat2 = "format2" } associatedWithEngines = [ "javaengine", "otherengine[0-9]" ] jmsServerDefaults = { defaultClientID = "a-default-client-ID" defaultSubscriberName = "a-default-subscriber-name" defaultMaxReconnectAttempts = 10 defaultReconnectSleepSeconds = 5 defaultDestinationMonitorIntervalMilliseconds = 10000 defaultJNDISecurityPrincipal = "default-jndi-security-principal" defaultJNDISecurityCredentials = "default-jndi-security-credentials" defaultJNDISecurityAuthentication = "default-jndi-security-authentication" defaultJNDISecurityProtocol = "default-jndi-security-protocol" defaultJNDIAuthoritative = true defaultJNDIDNSURL = "default-jndi-dns-url" defaultJNDIReferral = "default-jndi-referral" defaultJNDIConnectionBuilderClassName = "default.jndi.connection.builder.class.name" defaultJNDIInitialContextBuilderClassName = "default.jndi.initial.context.builder.class.name" defaultJNDIExtraProperties = { name1 = "val1" name2 = "val2" } defaultJMSServerCustomSettings = "Default custom settings for a custom connection builder" } defaultFieldMap = "fieldMap1" defaultJMSHeaderFieldMap = "headerFieldMap2" defaultJMSPropertyMap = "propertyMap1" defaultTimeStampFormat = "tsFormat2" defaultDeliveryTimeField = "myDeliveryTimeField" defaultMessageToTupleConverterClassName = "com.tibco.myMessageToTupleConverter" defaultTupleToMessageConverterClassName = "com.tibco.myTupleToMessageConverter" defaultMessageToTupleConverterCustomSettings = "a default converter settings string" defaultDeliveryMode = "NON_PERSISTENT" defaultTimeToLiveMilliseconds = 333 defaultPriority = 1 defaultDisableMessageID = false defaultDisableMessageTimeStamp = false } }