4 Replies Latest reply on Dec 9, 2005 11:12 PM by adrian.brock

    Topic takes longer thatn Queue

    balteo

      Hello,
      I have a standalone client that sends a message to a queue and publishes a message to a topic. The message is delivered almost immediately to the queue whereas it takes much longer to deliver the message to the topic.
      Why is that??
      Thanks in advance,
      Julien.

        • 1. Re: Topic takes longer thatn Queue
          genman

          Would you care to publish a benchmark and suite?

          • 2. Re: Topic takes longer thatn Queue
            balteo

            There is no benchmark. Simply I noticed that on my console and I was just wondering if there might be an obvious reason that I don't see....
            Julien.

            • 3. Re: Topic takes longer thatn Queue
              balteo

              I found some interesting info in the spec:
              section 6.2 of the jms spec:
              http://java.sun.com/products/jms/docs.html


              Pub/Sub Latency
              Since there is typically some latency in all pub/sub systems, the exact
              messages seen by a subscriber may vary depending on how quickly a JMS
              provider propagates the existence of a new subscriber and the length of time a
              provider retains messages in transit.
              For instance, some messages from a distant publisher may be missed because it
              may take a second for the existence of a new subscriber to be propagated
              system-wide. When a new subscriber is created, it may receive messages sent
              earlier because a provider may still have them available.
              JMS does not define the exact semantics that apply during the interval when a
              pub/sub provider is adjusting to a new client. JMS semantics only apply once
              the provider has reached a ?steady state? with respect to a new client.


              • 4. Re: Topic takes longer thatn Queue

                http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossHelp
                Unanswerable question.

                There is zero logical difference between a Queue and a Topic in terms of latency.

                The spec is just referring inherent latency in any asynchronous protocol
                such as JMS, rather than a synchronous protocol, e.g. RPC.

                You pay your money, you take your choice.