2 Replies Latest reply on May 19, 2010 10:45 AM by diktatoren

    How do I set up a queue with the publish/subscribe pattern

    diktatoren

      I'm using the core api, and I've set up a queue with the following configuration:

       

              <queue name="soccer.events.all">
                  <address>soccer.events.all</address>
             <durable>false</durable>
              </queue>

       

      What would I need to do in order to make messages to be delivered to multiple clients instead of just being consumed once?

       

      I use a relatively new build from the trunk, using the stomp connector. My clients are STOMP clients.

        • 1. Re: How do I set up a queue with the publish/subscribe pattern
          jmesnil

          PÃ¥l Evensen wrote:

           

          I'm using the core api, and I've set up a queue with the following configuration:

           

                  <queue name="soccer.events.all">
                      <address>soccer.events.all</address>
                 <durable>false</durable>
                  </queue>

           

          What would I need to do in order to make messages to be delivered to multiple clients instead of just being consumed once?

           

          I use a relatively new build from the trunk, using the stomp connector. My clients are STOMP clients.

          if you want to use pub/sub with Stomp, you need to prepend the address with "jms.topic."

          e.g. in your case, you'd use jms.topic.soccer.events.all and the Stomp clients would subscribe to this address. You don't need to declare any queue, our Stomp layer will make sure to create a queue for each Stomp clients subscribing to this address.

           

          fyi, this is a bit hacky: after 2.1.0 release, we will clean things up to avoid introducing JMS semantic when using Stomp.

          • 2. Re: How do I set up a queue with the publish/subscribe pattern
            diktatoren

            Thanks a lot! That worked like a charm.