[jboss-user] [JBoss Messaging] - Configuring the JMS Bridge
cpslo1999
do-not-reply at jboss.com
Tue May 26 19:40:07 EDT 2009
I've got two JBoss 5.0.1.GA instances. Server A has a topic and I would like to have bridged to a Queue on Server B.
I've added the following to Server B's deploy/messaging/jms-ds.xml
| <!-- Remote JMS Provider -->
| <mbean
| code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.messaging:service=JMSProviderLoader,name=MyRemoteJMSProvider,server=remotehost">
| <attribute name="ProviderName">RemoteXAConnectionFactory</attribute>
| <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
|
| <!-- The combined connection factory -->
| <attribute name="FactoryRef">XAConnectionFactory</attribute>
| <!-- The queue connection factory -->
| <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
| <!-- The topic factory -->
| <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
| <attribute name="Properties">
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=localhost:1199
| </attribute>
| </mbean>
|
I then created a file {Server B}/deploy/messaging/dfm-bridge-service.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <server>
|
| <mbean
| code="org.jboss.jms.server.bridge.BridgeService"
| name="jboss.jms:service=Bridge,name=DFMBrdige"
| xmbean-dd="xmdesc/Bridge-xmbean.xml">
| <depends optional-attribute-name="SourceProviderLoader">
| jboss.messaging:service=JMSProviderLoader,name=MyRemoteJMSProvider,server=remotehost
| </depends>
| <depends optional-attribute-name="TargetProviderLoader">
| jboss.messaging:service=JMSProviderLoader,name=JMSProvider
| </depends>
|
| <attribute name="SourceDestinationLookup">/topic/noticeTopic</attribute>
| <attribute name="TargetDestinationLookup">/queue/ingestRemote</attribute>
| <attribute name="QualityOfServiceMode">2</attribute>
| <attribute name="MaxBatchSize">5</attribute>
| <attribute name="MaxBatchTime">-1</attribute>
| <attribute name="FailureRetryInterval">5000</attribute>
| <attribute name="MaxRetries">-1</attribute>
| <attribute name="AddMessageIDInHeader">false</attribute>
| </mbean>
| </server>
|
I start up both servers and everything seems happy, including a message on
I've connected a very simple MDB to the queue on Server B
| @MessageDriven(activationConfig = {
| @ActivationConfigProperty(
| propertyName = "destinationType",
| propertyValue = "javax.jms.Queue"),
| @ActivationConfigProperty(
| propertyName = "destination",
| propertyValue = "queue/ingestRemote"),
| @ActivationConfigProperty(
| propertyName = "maxSession",
| propertyValue = "1")
| })
| public class IngestDFMMDB implements MessageListener {
| private final Log log = LogFactory.getLog(getClass());
|
| public void onMessage(Message msg) {
| log.fatal("DFM message received: " + msg);
| }
| }
|
I send messages to Server A's topic and detect that they have been sent via a JUnit test, but no message ever makes it to Server B's queue.
I've been following the instructions from here: http://www.jboss.org/community/wiki/JBMBridgeConfiguration
Any ideas why my MDB never gets called?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233439#4233439
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233439
More information about the jboss-user
mailing list