activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zxlllk <>
Subject Do the send timeouts actually work?
Date Wed, 19 Nov 2008 16:13:30 GMT

Hello all,

I am trying to send a message to an ActiveMQ queue.  ActiveMQ can be sort of
sketchy sometimes so I am trying to figure out a way to timeout a send
(messageProducer.send()).  I just found the method in the
ActiveMQConnectionFactory called setSendTimeout(int timeout).  I am now
using that method (and passing it a value of 1), but nothing is timing out. 
I am testing the timeouts by doing the following:

1. Start ActiveMQ
2. Connect to the queue.
3. Stop ActiveMQ
4. Send a message to ActiveMQ

The desired result is that after step 4 the message sending will reach the
timeout and then stop trying to send.  What actually happens is the message
sending enters an infinite loop and never returns from the send() method.

Can anyone tell me what I am doing wrong, or what is wrong with ActiveMQ? 
Thanks in advance!
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message