You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by oggie <go...@gmail.com> on 2012/10/01 21:59:25 UTC

Re: java broker with jms and point to point

I'm doing some more testing on this, and there's a big delay when sending the
message onto the queue.

As I noted earlier, I'm using spring jmsTemplate to put messages on the
queue. When I do this in the code:


        final byte[] data = result.toString().getBytes();

        jmsTemplate.send(new MessageCreator() {

            public Message createMessage(final Session session) throws
JMSException {
                BytesMessage message = session.createBytesMessage();
                message.writeBytes(data);
                return message;
            }
        });


I see delays anywhere from 20 seconds to a minute for the send method to
complete.  Any idea why? 

Thanks for all the help thus far. 





--
View this message in context: http://qpid.2158936.n2.nabble.com/java-broker-with-jms-and-point-to-point-tp7582591p7582802.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: java broker with jms and point to point

Posted by Phil Harvey <ph...@philharveyonline.com>.
Hi,

Is there anything unusual about your scenario?  For example, are your
messages large, or is there a slow network connection to the broker, or are
your client or broker machines heavily loaded?  In common with most
messaging brokers, Qpid can process many thousands of messages per second
so there must be something odd about your environment.

As with many performance problems, thread dumps are your friend.  Capture a
few thread dumps from your client application during the 20s delay (eg
using JStack) and I bet you'll see exactly where the bottleneck is.

Phil

On 1 October 2012 20:59, oggie <go...@gmail.com> wrote:

> I'm doing some more testing on this, and there's a big delay when sending
> the
> message onto the queue.
>
> As I noted earlier, I'm using spring jmsTemplate to put messages on the
> queue. When I do this in the code:
>
>
>         final byte[] data = result.toString().getBytes();
>
>         jmsTemplate.send(new MessageCreator() {
>
>             public Message createMessage(final Session session) throws
> JMSException {
>                 BytesMessage message = session.createBytesMessage();
>                 message.writeBytes(data);
>                 return message;
>             }
>         });
>
>
> I see delays anywhere from 20 seconds to a minute for the send method to
> complete.  Any idea why?
>
> Thanks for all the help thus far.
>
>
>
>
>
> --
> View this message in context:
> http://qpid.2158936.n2.nabble.com/java-broker-with-jms-and-point-to-point-tp7582591p7582802.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>