On 03/07/2017 07:46 AM, Vince Cole wrote:
I have a requirement to for my client (a JMS producer) to block, and only
return once the message has been accepted onto the specified queue or topic.
If the message is not accepted, then an exception should be thrown. We don't
care whether anything actually consumes the message.
However, my client can only seem to produce messages in asynchronous mode!
So if there's an exception, all we can do is log it. That's not enough, I
need the client to keep the message (so it can retry later) and only drop it
once the broker has accepted it into the specified queue/topic.
Please could you advise if ActiveMQ supports synchronous production via a
JMS client and if so what settings to use, in the following (where
Give the docs a read, namely the configuration options that mention sync
send.
http://activemq.apache.org/connection-configuration-uri.html
relevant):
* Options in the transport URI (in activemq.xml)
* Options in the connection URI (used by the client)
* Whether messages need to be 'persistent' or not?
* Whether the producer's JMS session should be transacted or not?
* What 'acknowledge mode' to set?
* Whether having a 'ConnectionListener' set on the connection will force it
to be asynchronous, regardless?
Thanks in advance.
--
View this message in context:
http://activemq.2283324.n4.nabble.com/Synchronous-message-production-tp4723171.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
--
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/