activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rahuljoshi80 <>
Subject LoadTesting ActiveMQ for Synchronous Calls. (Consumer disappears)
Date Tue, 29 Apr 2008 00:13:43 GMT

I have a java Test Client that is using the javax.jms.TopicRequestor to send
a request on a topic. Below is a snippet of code of how the topicRequestor
call is made.

javax.jms.TopicRequestor requestor = new javax.jms.TopicRequestor(aSession,
        javax.jms.Message response = requestor.request(msg);
        javax.jms.TextMessage textMessage = (javax.jms.TextMessage)
As Seen above i am trying to make a synchronous call.
I have a C++ program on the other side of the Broker that is listening to
the "aJMSTopic" using a message Listener. When the C++ program receives a
msg, it takes this message and stores a <messageID,ReplyTodestination> pair
in a local map. When it is time to publish a reply , the C++ program knows
where to send the reply as it has the ReplyToDestination stored in a map.
Thus the java client gets the appropriate response.

The most interesting thing here is that this mechanism works perfectly until
i put it under some load. Lets say that the java test client just keeps
making these requests. After some time, the messageListener on the C++ side
will stop receiving messages from the java test client. 

There are no exceptions that occur in the activemq log files. Also, when the
messageListener stop receiving messages at that point i also noticed that
jconsole shows me that the consumer count for that particular topic is 0 !
So obviously the message listener is not listening to the message published
by the java test client. Why would this happen?

Has anyone tried to do a similar kind of load test...thats is synchronous
calling between a java and a C++ program on either side of the broker?

Any insight will be appreciated. Please help...we really need to get this
pattern to work.  I have tried several things including performing a 
consumer.receive (timeout) on the c++ side as opposed to using a

Thanking you Sincerely
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message