You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by kev <kb...@redhat.com> on 2014/07/10 11:51:20 UTC

Using non-standard JMS correlation ID

Hi all

I'm trying to create a Camel route that will post a message to a legacy
system with a JMS interface, and wait for a reply on a specific JMS queue.
This seems to be a pretty standard use of the inout exchange pattern.
However, the legacy system does not use the standard JSMCorrelationID header
to associate outbound messages with their inbound requests. Instead, it uses
an entirely non-standard header. 

As I understand it, if I use

from (jms:something).inout(jms:something?replyTo=output_queue)

then Camel will use JMSCorrelationID to match the inbound and outbound
messages. However, is there any way that inout() can be configured to use
some other header?

If not, is there some other way to approach this problem using standard
Camel features?

Thanks
Kev




--
View this message in context: http://camel.465427.n5.nabble.com/Using-non-standard-JMS-correlation-ID-tp5753642.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Using non-standard JMS correlation ID

Posted by kev <kb...@redhat.com>.
Hi Jeff

Thanks for the reply, but I'm not sure why using exclusive mode here 
makes any difference. As I understand it, the difference between 
exclusive/shared is whether selectors are used to filter replies from 
other messages on a particular queue.

What method is used to consume replies from the reply queue, presumably 
there has to be some way to match up the response with the request that 
it corresponds to. I believe that JMSCorrelationID is the standard way 
to do this, but the system I have to connect to does not forward 
JMSCorrelationID in its response messages.

Looking at the Camel source, it looks to me as if the use of 
JMSCorrelationID is hard-coded as the way to match requests with 
responses, but maybe I'm not looking carefully.

Best wishes
Kevin

On 07/10/2014 03:27 PM, Jeff Bischoff [via Camel] wrote:
> Hmm I meant to link you to the *exclusive* fixed reply queue, not the
> shared one.
>
> Correct link:
> http://camel.apache.org/jms.html#JMS-Request-replyoverJMSandusinganexclusiv
> efixedreplyqueue
>
>
> Jeff
>
> On 7/10/14 10:24 AM, "Jeff Bischoff" <[hidden email] 
> </user/SendEmail.jtp?type=node&node=5753652&i=0>> wrote:
>
> >Hi Kev,
> >
> >I believe you can use an exclusive fixed reply queue for that.
> >
> >Please see:
> >http://camel.apache.org/jms.html#JMS-AboutusingCameltosendandreceivemessag
> >e
> >sandJMSReplyTo
> >And especially see:
> >http://camel.apache.org/jms.html#JMS-Request-replyoverJMSandusingasharedfi
> >x
> >edreplyqueue
> >
> >I've had some trouble with this problem myself. Hopefully it helps you!
> >
> >Jeff
> >
> >On 7/10/14 5:51 AM, "kev" <[hidden email] 
> </user/SendEmail.jtp?type=node&node=5753652&i=1>> wrote:
> >
> >>Hi all
> >>
> >>I'm trying to create a Camel route that will post a message to a legacy
> >>system with a JMS interface, and wait for a reply on a specific JMS
> >>queue.
> >>This seems to be a pretty standard use of the inout exchange pattern.
> >>However, the legacy system does not use the standard JSMCorrelationID
> >>header
> >>to associate outbound messages with their inbound requests. Instead, it
> >>uses
> >>an entirely non-standard header.
> >>
> >>As I understand it, if I use
> >>
> >>from (jms:something).inout(jms:something?replyTo=output_queue)
> >>
> >>then Camel will use JMSCorrelationID to match the inbound and outbound
> >>messages. However, is there any way that inout() can be configured 
> to use
> >>some other header?
> >>
> >>If not, is there some other way to approach this problem using standard
> >>Camel features?
> >>
> >>Thanks
> >>Kev
> >>
> >>
> >>
> >>
> >>--
> >>View this message in context:
> >>http://camel.465427.n5.nabble.com/Using-non-standard-JMS-correlation-ID-t
> >>p
> >>5753642.html
> >>Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >________________________________
> >
> >Please take note: This email, including attachments, contains 
> information
> >which may be confidential or legally privileged and is only for the use
> >of the individual or entity to whom it is properly addressed. Any
> >unauthorized review, use, disclosure, copying, or distribution is
> >prohibited. If you have reason to believe that you have received this
> >communication in error, or that it may be misaddressed or not intended
> >for you, please destroy it and notify the sender immediately. Thank you.
>
> ________________________________
>
> Please take note: This email, including attachments, contains 
> information which may be confidential or legally privileged and is 
> only for the use of the individual or entity to whom it is properly 
> addressed. Any unauthorized review, use, disclosure, copying, or 
> distribution is prohibited. If you have reason to believe that you 
> have received this communication in error, or that it may be 
> misaddressed or not intended for you, please destroy it and notify the 
> sender immediately. Thank you.
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the 
> discussion below:
> http://camel.465427.n5.nabble.com/Using-non-standard-JMS-correlation-ID-tp5753642p5753652.html 
>
> To unsubscribe from Using non-standard JMS correlation ID, click here 
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5753642&code=a2Jvb25lQHJlZGhhdC5jb218NTc1MzY0MnwxNTk3MzA2NzY1>.
> NAML 
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> 
>





--
View this message in context: http://camel.465427.n5.nabble.com/Using-non-standard-JMS-correlation-ID-tp5753642p5753653.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Using non-standard JMS correlation ID

Posted by Jeff Bischoff <jb...@wdtablesystems.com>.
Hmm I meant to link you to the *exclusive* fixed reply queue, not the
shared one.

Correct link:
http://camel.apache.org/jms.html#JMS-Request-replyoverJMSandusinganexclusiv
efixedreplyqueue


Jeff

On 7/10/14 10:24 AM, "Jeff Bischoff" <jb...@wdtablesystems.com> wrote:

>Hi Kev,
>
>I believe you can use an exclusive fixed reply queue for that.
>
>Please see:
>http://camel.apache.org/jms.html#JMS-AboutusingCameltosendandreceivemessag
>e
>sandJMSReplyTo
>And especially see:
>http://camel.apache.org/jms.html#JMS-Request-replyoverJMSandusingasharedfi
>x
>edreplyqueue
>
>I've had some trouble with this problem myself. Hopefully it helps you!
>
>Jeff
>
>On 7/10/14 5:51 AM, "kev" <kb...@redhat.com> wrote:
>
>>Hi all
>>
>>I'm trying to create a Camel route that will post a message to a legacy
>>system with a JMS interface, and wait for a reply on a specific JMS
>>queue.
>>This seems to be a pretty standard use of the inout exchange pattern.
>>However, the legacy system does not use the standard JSMCorrelationID
>>header
>>to associate outbound messages with their inbound requests. Instead, it
>>uses
>>an entirely non-standard header.
>>
>>As I understand it, if I use
>>
>>from (jms:something).inout(jms:something?replyTo=output_queue)
>>
>>then Camel will use JMSCorrelationID to match the inbound and outbound
>>messages. However, is there any way that inout() can be configured to use
>>some other header?
>>
>>If not, is there some other way to approach this problem using standard
>>Camel features?
>>
>>Thanks
>>Kev
>>
>>
>>
>>
>>--
>>View this message in context:
>>http://camel.465427.n5.nabble.com/Using-non-standard-JMS-correlation-ID-t
>>p
>>5753642.html
>>Sent from the Camel - Users mailing list archive at Nabble.com.
>
>________________________________
>
>Please take note: This email, including attachments, contains information
>which may be confidential or legally privileged and is only for the use
>of the individual or entity to whom it is properly addressed. Any
>unauthorized review, use, disclosure, copying, or distribution is
>prohibited. If you have reason to believe that you have received this
>communication in error, or that it may be misaddressed or not intended
>for you, please destroy it and notify the sender immediately. Thank you.

________________________________

Please take note: This email, including attachments, contains information which may be confidential or legally privileged and is only for the use of the individual or entity to whom it is properly addressed. Any unauthorized review, use, disclosure, copying, or distribution is prohibited. If you have reason to believe that you have received this communication in error, or that it may be misaddressed or not intended for you, please destroy it and notify the sender immediately. Thank you.

Re: Using non-standard JMS correlation ID

Posted by Jeff Bischoff <jb...@wdtablesystems.com>.
Hi Kev,

I believe you can use an exclusive fixed reply queue for that.

Please see:
http://camel.apache.org/jms.html#JMS-AboutusingCameltosendandreceivemessage
sandJMSReplyTo
And especially see:
http://camel.apache.org/jms.html#JMS-Request-replyoverJMSandusingasharedfix
edreplyqueue

I've had some trouble with this problem myself. Hopefully it helps you!

Jeff

On 7/10/14 5:51 AM, "kev" <kb...@redhat.com> wrote:

>Hi all
>
>I'm trying to create a Camel route that will post a message to a legacy
>system with a JMS interface, and wait for a reply on a specific JMS queue.
>This seems to be a pretty standard use of the inout exchange pattern.
>However, the legacy system does not use the standard JSMCorrelationID
>header
>to associate outbound messages with their inbound requests. Instead, it
>uses
>an entirely non-standard header.
>
>As I understand it, if I use
>
>from (jms:something).inout(jms:something?replyTo=output_queue)
>
>then Camel will use JMSCorrelationID to match the inbound and outbound
>messages. However, is there any way that inout() can be configured to use
>some other header?
>
>If not, is there some other way to approach this problem using standard
>Camel features?
>
>Thanks
>Kev
>
>
>
>
>--
>View this message in context:
>http://camel.465427.n5.nabble.com/Using-non-standard-JMS-correlation-ID-tp
>5753642.html
>Sent from the Camel - Users mailing list archive at Nabble.com.

________________________________

Please take note: This email, including attachments, contains information which may be confidential or legally privileged and is only for the use of the individual or entity to whom it is properly addressed. Any unauthorized review, use, disclosure, copying, or distribution is prohibited. If you have reason to believe that you have received this communication in error, or that it may be misaddressed or not intended for you, please destroy it and notify the sender immediately. Thank you.