1 Reply Latest reply on Jul 14, 2010 3:41 PM by clebert.suconic

    Streaming versus non-streaming

    aengineer

      I am trying to understand why streaming large messages (1M+) is typically faster than publishing regular (non-streaming) messages. In our case, we typically use TextMessages and the payload is a simple text string with a lot of whitespace. However since streaming sends the data in chunks, I would have expected streaming to be slower.

       

      Thanks

      Aspi Engineer

      Putnam Investments

        • 1. Re: Streaming versus non-streaming
          clebert.suconic

          If you are using 2.1.1, a message this big will be sent in chunks anyway. (it all depends on the

          min-large-message-size configured at the connectionFactory)

           

           

          But if you just create a Bytemessage, you will first have to allocate the entire message in memory before sending it, while if you stream it.. it will just leave the source (The InputStream, on whatever media it is) directly without having to be allocated.

           

          So, you have an extra step on the BytesMessage.