qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rlemmers <ruud.lemm...@cgi.com>
Subject Qpid Proton (Java) - send() method frequently hangs when sending to ActiveMQ queue
Date Fri, 26 Aug 2016 08:20:11 GMT
I'm using Qpid Proton (proton-j-0.13.0) to send messages over AMQP to an
ActiveMQ 5.12.0 queue. On a development machine, where ActiveMQ and the Java
program run on the same machine, this is working fine. On a test
environment, where ActiveMQ is running on a separate server, we see the
send() method hangs in 15 to 20 percent of the cases. The CPU also remains
around 100% when the send() method hangt. When the send() succeeds, it
completes within 0.1 seconds.

*Statements to perform a send are similar to this:*
final Messenger messenger = Messenger.Factory.create();
messenger.start;
messenger.put(message); // one message of 1 KByte
messenger.send(1);
messenger.stop();

I'm aware Messenger.send(int n) is a blocking method. However, I don't know
why it would block my calls. I can add a timeout and try to resend the
message, but that's a workaround instead of a proper solution.

*Statements to receive the sent messages from ActiveMQ are similar to this:*
this.messenger = Messenger.Factory.create();
this.messenger.start();
this.messenger.subscribe(this.address);

while (this.isRunning) {
    try {
        this.messenger.recv(1);
        while (this.messenger.incoming() > 0) {
            final Message message = this.messenger.get();
            this.messageListener.onMessage(message);
        } catch (final Exception e) {
            LOGGER.error("Exception while receiving messages", e);
        }
}

Am I missing something simple, being a Qpid newbie? Could this be
configuration in ActiveMQ? Is it normal to add a timeout and retry? Any help
to resolve this would appreciated.

(Note: I also posted this question on Stackoverflow)



--
View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-Proton-Java-send-method-frequently-hangs-when-sending-to-ActiveMQ-queue-tp7649640.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


Mime
View raw message