3 Replies Latest reply on Aug 4, 2011 3:24 PM by timfox

    request/reply across jms bridge

    jburkhardt

      I'm investigating replacing FioranoMQ with HornetQ and before I get much further I wanted to see if anyone had the quick and easy answer for this question.

      I have 3 JMS servers that live in different places and need to share messages amongst each other.  This problem is easily solved using the HornetQ JMS Bridge.  However,  we also do request/reply between the 3 servers like so:

      A client sends a query to a topic, creates a new temporary destination and sets JMSReplyTo to it's value.  Client then listens for a response on that destination.

      In this scenario the client publishes the message to Server #2  on a topic that only Server #1 knows how to answer.  This topic is bridged to Server #1 so the query message goes out across the bridge and arrives at some client who knows how to respond. 

      Right now using FioranoMQ this works okay as their concept of a bridge (using their term, a repeater) also lets you configure a hidden reply destination which kind of acts as a proxy to get the response back to the actual destination set in JMSReplyTo. 

       

      I'm sure I could make this work by setting up actual reply destinations that aren't temporary and creating bridges for them as well, but that is a lot of extra configuration.  Is there an easier way?

        • 1. Re: request/reply across jms bridge
          ataylor

          firstly, instead of configuring bridges why dont you just set up a 3 node cluster, that way messages will be load balanced around the noes.

           

          regarding temp queues, these are not cluster wide so for this to work you will have to preconfigure the reply queue or create them on every node.

          • 2. Re: request/reply across jms bridge
            jburkhardt

            Sorry, I should have been a bit more specific regarding my needs, a few things prevent me from using a cluster.

            I have 3 "types" of destinations that live at each server.   Some are data topics that need to be replicated across all 3 servers, so each server has it's own copy of the data.  Some are data topics that don't get replicated and only exist on a specific server.  And last, some are request destinations that are used in the request/reply example I offered above.

            It seems to me the only solution will be to create another group, reply destinations, that are used in the request/reply dynamic.

            • 3. Re: request/reply across jms bridge
              timfox

              Don't know if it helps, but HQ has the ability to store all message ids in the header. Take a look in the user manual, chapter on JMS bridge, addMessageIDInHeader