0
votes

I have to push messages from one jobss server and consume from another jboss server. For that I used jms bridge.

Added jms bridge configuration under </hornetq-server> tag in standalone-full.xml and also referred dependencies via module.

<jms-bridge name="simpleBridge" module="org.jboss.messaging">
			  <source>
				 <connection-factory name="ConnectionFactory"/>
				 <destination name="java:/simpleSOurceQ"/>
			  </source>
			  <target>
				 <connection-factory name="RemoteConnectionFactory"/>
				 <destination name="/queue/simpleTargetQ"/>
				 <context>
					<property key="java.naming.factory.initial" value="org.jboss.naming.remote.client.InitialContextFactory"/>
					<property key="java.naming.provider.url"    value="remote://TARGET_URL:5445"/>
				 </context>
			  </target>
			  <quality-of-service>DUPLICATES_OK</quality-of-service>
			  <failure-retry-interval>500</failure-retry-interval>
			  <max-retries>1</max-retries>
			  <max-batch-size>500</max-batch-size>
			  <max-batch-time>500</max-batch-time>
			  <add-messageID-in-header>true</add-messageID-in-header>
		   </jms-bridge>

Deployment time, getting below ERROR in jboss,

ERROR LOG : ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("add") failed - address: ([ ("subsystem" => "messaging"), ("jms-bridge" => "simpleBridge") ]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.messaging.jms-bridge.simpleBridge is missing [jboss.naming.context.java.simpleSourceQ]"]}

How to resolve this?

or Is there anyway to achieve this?

1
If both source destination (java:/simpleSOurceQ) and target destination (/queue/simpleTargetQ) are defined?Varun Jain
As per the logs that you have posted, I believe that the source destination is not defined.Varun Jain
Its already defined in standalone-full.xml inside jms-destinations tag, <jms-queue name="simpleSourceQ"> <entry name="jms/queue/simpleSourceQ"/> <entry name="java:jboss/exported/jms/queue/simpleSourceQ"/> <durable>true</durable> </jms-queue> </jms-destinations>shanmuga
@VarunJain, simpleSourceQ defined in Source System and simpleTargetQ defined in Target system. Its defined in standalone-full.xml under "jms-desinations" tagshanmuga
Change the <destination name="java:/simpleSOurceQ"/> to <destination name="simpleSOurceQ"/>Varun Jain

1 Answers

0
votes

The bridge's source is defined as:

<source>
   <connection-factory name="ConnectionFactory"/>
   <destination name="java:/simpleSOurceQ"/>
</source>

However, according to a comment your jms-queue is defined as:

<jms-queue name="simpleSourceQ">
   <entry name="jms/queue/simpleSourceQ"/>
   <entry name="java:jboss/exported/jms/queue/simpleSourceQ"/>
   <durable>true</durable>
</jms-queue>

As you can see, the destination name from the source doesn't match any of the entry elements from the jms-queue therefore the bridge dependencies are not met. The bridge's source should reference a valid JNDI entry of the jms-queue.