0
votes

I'm new to JMS programming (Java).

  • I have a machine M1, in a domain D1 and a machine M2 in another domain D2.
  • I have in M1 a JMS producer. And in M2 a JMS consumer. Both have as servers JBoss 7.2.
  • So it seems the only solution is to create a JMS bridge.

I'm reading the official documentation. So I wonder if creating an SSH tunnel is necessary.

Second, in which hornetq-configuration.xml file should I set the following configuration?

<bridge name="my-bridge">
   <queue-name>jms.queue.sausage-factory</queue-name>
   <forwarding-address>jms.queue.mincing-machine</forwarding-address>
   <filter-string="name='aardvark'"/>
   <transformer-class-name>
      org.hornetq.jms.example.HatColourChangeTransformer
   </transformer-class-name>
   <retry-interval>1000</retry-interval>
   <ha>true</ha>
   <retry-interval-multiplier>1.0</retry-interval-multiplier>
   <reconnect-attempts>-1</reconnect-attempts>
   <failover-on-server-shutdown>false</failover-on-server-shutdown>
   <use-duplicate-detection>true</use-duplicate-detection>
   <confirmation-window-size>10000000</confirmation-window-size>
   <user>foouser</user>
   <password>foopassword</password>
   <static-connectors>
      <connector-ref>remote-connector</connector-ref>
   </static-connectors>
   <!-- alternative to static-connectors
   <discovery-group-ref discovery-group-name="bridge-discovery-group"/>
   -->
</bridge>

Should it be in the in JBoss server of the JMS producer machine or consumer machine?

My third question is, is there a difference in settings between JMS bridge and core bridge?

I would be so thankful for any additional information and explainations!

Thank you a lot!

1

1 Answers

0
votes

I know this is little late for OP, may be this information helps someone.

Firstly, the difference between Core and JMS bridge. Read doc here

Core bridges are for linking a HornetQ node with another HornetQ node and do not use the JMS API. A JMS Bridge is used for linking any two JMS 1.1 compliant JMS providers.

The Core bridge uses proprietary HornetQ core api so it can only connect two HornetQ servers. Whereas JMS bridges use the JMS API so could connect any JMS1.1 API complaint servers.eg: HornetQ to ActiveMQ.

The configuration mentioned in question is Core bridge and can be configured in the source server.Since you seem to connect two HornetQ server Core bridges is the way forward. That said, in your case you could use JMS bridges as well since both are JMS complaint.But the recommended approach would be to use Core bridge due to performance advantage gain.

Finally, the JBoss installation server comes with some handy examples.You could find Core bridge example under [JBOSS_HOME]\jboss-as\extras\hornetq\examples\jms\bridge.