activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Bertram <jbert...@apache.com>
Subject Re: Non blocking interceptor for MQTT
Date Thu, 08 Sep 2016 14:40:25 GMT
I made a couple different suggestions, but I deduce that you are using an interceptor to manually
send a message to another queue rather than using a non-exclusive divert.  Furthermore, you
appear to be using the JMS API to send the message.  I would recommend that you use a non-exclusive
divert instead of an interceptor to save yourself the trouble of writing and maintaining the
interceptor, but if you're determined to use the interceptor then I recommend you use the
core API rather than the JMS API (as I showed you in a previous message on the dev list).
 You can create a non-durable message (which will be sent non-blocking by default) by passing
false to org.apache.activemq.artemis.api.core.client.ClientSession#createMessage(boolean).


Justin

----- Original Message -----
From: "aries.aries" <aries123.aries123@gmail.com>
To: users@activemq.apache.org
Sent: Wednesday, September 7, 2016 6:33:12 PM
Subject: Re: Non blocking interceptor for MQTT

Hi,

I tried your suggestion. It works. I run a separate thread which
continuously removes messages from the queue and does the processing. 

However, the problem is I get the below exception when I close the broker.

javax.jms.JMSException: AMQ119016: Connection failure detected. Unblocking a
blocking call that will never get a response

Can you please tell me how to send a non-blocking message to a queue? I used
the method in the "SimpleQueueSender" example (link below). 

https://github.com/apache/activemq-artemis/blob/beae4265a24832873b782303385b64fc1b2452b1/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java




--
View this message in context: http://activemq.2283324.n4.nabble.com/Non-blocking-interceptor-for-MQTT-tp4715995p4716281.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message