2 Replies Latest reply on Apr 29, 2003 10:38 AM by schoeto

    Pubish/Subscribe Speed, Latency and Limits

    schoeto Newbie

      I am evaluating JBossMQ for a telecom application. We would like to replace a legacy app that broadcasts UDP packets to update clients using the JMS Pub/Sub model. I'm trying to set up a test environment where I can have 1000 subscribers listening for published messages.

      I have a test case where I publish 1000 messages to 450 subscribers. I can publish all 1000 messages in a little under 3 minutes. My message type is MapMessage and each message has 3 double values representing a stock price. However, it takes almost 8 mins for all of the clients to catch up and receive all the messages. How can I tweek my JBossMQ installation to reduce the pub/sub latency?

      Also, I was getting an OutOfMemoryException using this test case, I increased the heap to 600M and it was resolved for now. Is there a way to block on the publish call so that the publisher can't publish more messages than the server can handle?

      Finally, is there a message type that serializes more efficiently than the others. Is a ByteMessage faster to marshall over the socket than a MapMessage or TextMessage?

      Running JBoss-3.2.0
      RedHat Linux 7.3
      Intel PIII 850mhz
      512M mem

      Subscriber Apps:
      Swing app running on Win2k machines

      Tony Schoenbachler
      eOn Communications

        • 1. Re: Pubish/Subscribe Speed, Latency and Limits
          Adrian Brock Master

          The subscribe is always slower than
          the publish.
          First, it does twice as much work as the publish
          (it does a receive and an acknowledge request)
          Second, you push the message to 450 clients
          concurrently whereas the publish was just one

          Sadly, there is no flow control, but as 3.0.7/3.2,
          the message cache should act as a brake on the
          If memory becomes tight, the publishing thread
          is used to push messages out to disk to make room
          for the new message. A sort of One-in-One-out

          The OutOfMemoryException is caused by the
          message cache settings - use search to find an

          I have never measured the relative performance
          of the serialization. If you do decide to measure
          it, maybe you can post the results?
          NOTE: Some of the implementations contain
          workarounds for bugs in jdk1.3 which makes
          them slower than they could be.


          • 2. Re: Pubish/Subscribe Speed, Latency and Limits
            schoeto Newbie

            I did several test case comparisons between a MapMessage and a StreamMessage for message delivery speed. I was able to double the speed. My test case involved publishing 1000 messages to one subscriber. The message was small and contained 3 double values.