activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: How to check if 'jms.useAsyncSend=true' is set in an inbound message?
Date Thu, 17 Oct 2013 15:23:08 GMT
I don't think there is an easier way to set asyncSend in your setup.
But to validate it is in use, in your camel context is you can get the
in message and cast to ActiiveMQMessage you can check
org.apache.activemq.command.BaseCommand#isResponseRequired

with asyncSend that will be false.

On 15 October 2013 22:38, damu <toshenc@yahoo.com> wrote:
>
> Hi all,
>
> We are using the embedded activemq broker within Fuse ESB (7.1.0) with
> consumers co-located .
>
> The producer client is deployed on a remote GlassFish server. It uses
> activeMQ resource adapter (5.6.0) along with spring jms template. The client
> publish messages to different queues. I want some of the messages (going to
> a given queue) to use jms.useAsyncSend=true where as the other messages
> should use the default. I see below options
>
> 1) I can't append the the option 'jms.useAsyncSend=true' in the resource
> adapter URL because that will enforce it for all messages.
>
> 2) The JNDI look-up for the connection factory is returning an instance of
> 'org.apache.activemq*.ra.*ActiveMQConnectionFactory'. I was actually
> expecting an instance of org.apache.activemq.ActiveMQConnectionFactory,
> which would have allowed me to use setUseAsyncSend() for the corresponding
> jmsTemplate. So I can't use this option as well.
>
> 3) I have multiple connection factories configured under the GlassFish
> connectors (one for each queue). I am trying to pass the property
> 'jms.useAsyncSend=true' as an additional property to a particular connection
> factory. I am expecting this to be used only for the connections created in
> that particular connection pool. Now, having done this I want to verify if
> it really worked.
>
> Question 1) Is there a way where I can check in the consumer side if the
> property 'useAsyncSend' was set in an inbound message? This is to verify
> what I have done at producer side has actually worked. Note that I am using
> camel-context to route messages to the end consumers. Is there a way to
> check this within the came-context? is there a header or any such thing
> corresponding to this?
>
> Question 2) Is there a better way to set 'useAsyncSend' in the producer side
> where one resource adapter is used for sending messages to different queues
> with different values for 'useAsyncSend'.
>
> I understand that 'useAsyncSend' is an activeMQ specific configuration hence
> not available in jmstemplate interface
>
> Appreciate any help on this.
>
> thanks,
> Damu
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/How-to-check-if-jms-useAsyncSend-true-is-set-in-an-inbound-message-tp4672842.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://redhat.com
http://blog.garytully.com

Mime
View raw message