Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
8.3. Bridge Configuration
The following code is an example configuration of the message bridge, showing all attributes. Some attributes have been commented out for this configuration, since not all attributes should be specified at once.
Example 8.1. Message Bridge Configuration
Message Bridge Configuration Attributes
- SourceProviderLoader, TargetProvider Loader
- The
JMSProviderLoadermanaged bean is used by the bridge to look up the source connection factory and source destination. By default, JBoss Enterprise Application Platform ships with oneJMSProviderLoader, which is deployed in the$JBOSS_HOME/server/$PROFILE/deploy/messaging/jms-ds.xmlfile, and serves as the default localJMSProviderLoader. For a clustered configuration,hajndi-jms-ds.xmlperforms the same role.If your source or target destination is on a different server, or corresponds to a non-JBoss JMS Provider, you can deploy anotherJMSProviderLoadermanaged bean instance that the bridge can use to contact the destination on the remote JMS Provider.To useQOS_ONCE_AND_ONLY_ONCEdelivery with a remote non-JBoss Messaging source or target, the remote JMS Provider must provide a fully-functional JMS XA resource implementation that works remotely from the server. - SourceDestinationLookup
- The full JNDI lookup for the source destination, via the
SourceProviderLoader, such as/queue/mySourceQueue. - TargetDestinationLookup
- The full JNDI lookup for the target destination, via the
TargetProviderLocator, such as/topic/myTargetTopic. - SourceUsername
- An optional attribute that specifies the username used when creating the source connection.
- SourcePassword
- An optional attribute that specifies the password used when creating the source connection.
- TargetUsername
- An optional attribute that specifies the username used when creating the target connection.
- TargetPassword
- An optional attribute that specifies the password used when creating the target connection.
- QualityOfServiceMode
- An integer representing the desired quality of service mode. The possible values are:
0to representQOS_AT_MOST_ONCE1to representQOS_DUPLICATES_OK2to representQOS_ONCE_AND_ONLY_ONCE
See Section 8.1, “Message Bridge Overview” for a complete explanation of these modes. - Selector
- An optional attribute that lets you provide a JMS selector expression when consuming messages from a source destination. Only messages that match the selector expression are bridged from the source to the target destination. The selector expression must follow the JMS selector syntax, specified here: http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Message.html.For optimal performance, apply source topic subscription selectors to source queue consumers.
- MaxBatchSize
- Specifies the maximum number of messages to consume from the source destination before sending a message batch to the target destination. Its value must be greater than or equal to
1. - MaxBatchTime
- Specifies the longest period (in milliseconds) to wait before sending a message batch to the target, even if the
MaxBatchSizehas not been reached. Its value must be either-1(wait forever) or greater than or equal to1to specify a time. - SubName
- Represents the name of the durable subscription that will consume from the source destination topic.
- ClientID
- Represents the JMS client ID to use when creating or looking up the durable subscription that will consume from the source destination topic.
- FailureRetryInterval
- The period of time (in milliseconds) to wait between attempting to recreate the connection to the source or target server after failure is detected.
- MaxRetries
- The number of times to attempt to recreate the connection to the source or target server after failure is detected. The bridge will then stop attempting to recreate the connection. A value of
-1means that the bridge will continue to attempt to reconnect forever. - AddMessageIDInHeader
- When
true, the original message ID is added to theJBossMessage.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LISTheader of the message being sent to the destination. If the message is bridged multiple times, each message ID is added to the header. This enables a distributed request-response pattern.