You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Paul Broughton Spida Solutions <pa...@spidasolutions.com> on 2018/02/26 11:42:59 UTC

camel toD with replyTo in URI specifying IBM MQ queue manager

 Hi, I have a toD element in my route which sends to a jms Queue which is provided by IBM MQ. I have the CamelJMSDestinationName set to the queue and a uri which looks similar to the folowing
wmq:queue:placeholder?preserveMessageQos=true&amp;replyTo=myQM/myTestQ&amp;exchangePattern=inOut&amp;replyToType=shared....
according to my understanding of what I have read on the various forums on this I would expect this to be translated into a replyTo Queue Manager and Queue combination that MQ can understand. However, the data in replyTo is simply translated into a queue name that contains a slash with no queue manager.
Does anybody have any insights into how to go about setting the replyTo queue manager on such a route? I have tried setting the JMSReplyTo value in the context header but this just gets overridden by the URI value and if I dont have the URI value then camel assumes a dynamic response queue (which ironically does have the queue manager details properly populated)
thanks Paul

Paul Broughton
Spida Solutions
London • Bath • UK
+44 (0)79 319 38243
+44 (0)12 4981 5081
www.spidasolutions.com


Re: camel toD with replyTo in URI specifying IBM MQ queue manager

Posted by Paul Broughton Spida Solutions <pa...@spidasolutions.com>.
Thanks Claus, I will certainly take a look at doing that.

In the interim, I used your suggestion of a destination resolver. I am now overriding the default behaviour when its needed by injecting a destination resolver under certain conditions which is working fine for now. The better solution obviously is to fix things at source but this solution at least allows the project to proceed immediately.

regards
Paul

On 27 Feb 2018, 12:15 +0000, Claus Ibsen <cl...@gmail.com>, wrote:
> Hi
>
> Thanks for the analysis. You can log a JIRA in the issue tracker
> (there is a link from this page)
> http://camel.apache.org/support.html
>
> You are welcome to dive into the source code in camel-jms to see if
> you can find where that normalization is and fix so it only prefix
> with double slashes.
> http://camel.apache.org/contributing
>
> On Tue, Feb 27, 2018 at 12:18 PM, Paul Broughton Spida Solutions
> <pa...@spidasolutions.com> wrote:
> > Hi Claus, I am starting to think that perhaps this is a bug within the Camel JMS framework (I could be wrong).
> >
> > What appears to be happening when it comes to the replyTo queue name is the Queue Name value is “normalised” incorrectly. As I understand things, if the replyTo queue is specified with a / (e.g. TESTQM/MyTestQ the queue should be defined with both the IBM MQ Queue manager and the queue name so the jms queue name should look something like "queue://TESTQM/MyTestQ”.
> > This isn’t happening and the JMSQueue object is being created instead as queue:///TESTQM/MyTestQ (Note the 3 “/“ after “queue:” as apposed to the correct 2 “/“ of the previous example).
> > It seems its impossible to get the Camel JMS component to create a replyTo JMSQueue object correctly.
> >
> > What is interesting is that if no replyTo is specified and the temp replyTo model is in use then the JMSQueue object is created perfectly , the queue name looks something like this queue://TESTQM/AMQ6634864376 which is 100% correct.
> >
> > Hopefully I am making some sense here. If this is a bug as I suspect, how would I go about raising that to the correct people?
> >
> > regards
> > Paul
> >
> > On 26 Feb 2018, 12:25 +0000, Claus Ibsen <cl...@gmail.com>, wrote:
> > > Hi
> > >
> > > I think there is some destination resolver spi you can configure on
> > > the component/endpoint where you can add your java code to build the
> > > queue name using the IBM MQ client api.
> > >
> > >
> > >
> > > On Mon, Feb 26, 2018 at 12:42 PM, Paul Broughton Spida Solutions
> > > <pa...@spidasolutions.com> wrote:
> > > > Hi, I have a toD element in my route which sends to a jms Queue which is provided by IBM MQ. I have the CamelJMSDestinationName set to the queue and a uri which looks similar to the folowing
> > > > wmq:queue:placeholder?preserveMessageQos=true&amp;replyTo=myQM/myTestQ&amp;exchangePattern=inOut&amp;replyToType=shared....
> > > > according to my understanding of what I have read on the various forums on this I would expect this to be translated into a replyTo Queue Manager and Queue combination that MQ can understand. However, the data in replyTo is simply translated into a queue name that contains a slash with no queue manager.
> > > > Does anybody have any insights into how to go about setting the replyTo queue manager on such a route? I have tried setting the JMSReplyTo value in the context header but this just gets overridden by the URI value and if I dont have the URI value then camel assumes a dynamic response queue (which ironically does have the queue manager details properly populated)
> > > > thanks Paul
> > > >
> > > > Paul Broughton
> > > > Spida Solutions
> > > > London • Bath • UK
> > > > +44 (0)79 319 38243
> > > > +44 (0)12 4981 5081
> > > > www.spidasolutions.com
> > > >
> > >
> > >
> > >
> > > --
> > > Claus Ibsen
> > > -----------------
> > > http://davsclaus.com @davsclaus
> > > Camel in Action 2: https://www.manning.com/ibsen2
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2

Re: camel toD with replyTo in URI specifying IBM MQ queue manager

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Thanks for the analysis. You can log a JIRA in the issue tracker
(there is a link from this page)
http://camel.apache.org/support.html

You are welcome to dive into the source code in camel-jms to see if
you can find where that normalization is and fix so it only prefix
with double slashes.
http://camel.apache.org/contributing

On Tue, Feb 27, 2018 at 12:18 PM, Paul Broughton Spida Solutions
<pa...@spidasolutions.com> wrote:
> Hi Claus, I am starting to think that perhaps this is a bug within the Camel JMS framework (I could be wrong).
>
> What appears to be happening when it comes to the replyTo queue name is the Queue Name value is “normalised” incorrectly. As I understand things, if the replyTo queue is specified with a / (e.g. TESTQM/MyTestQ the queue should be defined with both the IBM MQ Queue manager and the queue name so the jms queue name should look something like  "queue://TESTQM/MyTestQ”.
> This isn’t happening and the JMSQueue object is being created instead as queue:///TESTQM/MyTestQ (Note the 3 “/“ after “queue:” as apposed to the correct 2 “/“ of the previous example).
> It seems its impossible to get the Camel JMS component to create a replyTo JMSQueue object correctly.
>
> What is interesting is that if no replyTo is specified and the temp replyTo model is in use then the JMSQueue object is created perfectly , the queue name looks something like this queue://TESTQM/AMQ6634864376 which is 100% correct.
>
> Hopefully I am making some sense here. If this is a bug as I suspect, how would I go about raising that to the correct people?
>
> regards
> Paul
>
> On 26 Feb 2018, 12:25 +0000, Claus Ibsen <cl...@gmail.com>, wrote:
>> Hi
>>
>> I think there is some destination resolver spi you can configure on
>> the component/endpoint where you can add your java code to build the
>> queue name using the IBM MQ client api.
>>
>>
>>
>> On Mon, Feb 26, 2018 at 12:42 PM, Paul Broughton Spida Solutions
>> <pa...@spidasolutions.com> wrote:
>> > Hi, I have a toD element in my route which sends to a jms Queue which is provided by IBM MQ. I have the CamelJMSDestinationName set to the queue and a uri which looks similar to the folowing
>> > wmq:queue:placeholder?preserveMessageQos=true&amp;replyTo=myQM/myTestQ&amp;exchangePattern=inOut&amp;replyToType=shared....
>> > according to my understanding of what I have read on the various forums on this I would expect this to be translated into a replyTo Queue Manager and Queue combination that MQ can understand. However, the data in replyTo is simply translated into a queue name that contains a slash with no queue manager.
>> > Does anybody have any insights into how to go about setting the replyTo queue manager on such a route? I have tried setting the JMSReplyTo value in the context header but this just gets overridden by the URI value and if I dont have the URI value then camel assumes a dynamic response queue (which ironically does have the queue manager details properly populated)
>> > thanks Paul
>> >
>> > Paul Broughton
>> > Spida Solutions
>> > London • Bath • UK
>> > +44 (0)79 319 38243
>> > +44 (0)12 4981 5081
>> > www.spidasolutions.com
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> http://davsclaus.com @davsclaus
>> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: camel toD with replyTo in URI specifying IBM MQ queue manager

Posted by Paul Broughton Spida Solutions <pa...@spidasolutions.com>.
Hi Claus, I am starting to think that perhaps this is a bug within the Camel JMS framework (I could be wrong).

What appears to be happening when it comes to the replyTo queue name is the Queue Name value is “normalised” incorrectly. As I understand things, if the replyTo queue is specified with a / (e.g. TESTQM/MyTestQ the queue should be defined with both the IBM MQ Queue manager and the queue name so the jms queue name should look something like  "queue://TESTQM/MyTestQ”.
This isn’t happening and the JMSQueue object is being created instead as queue:///TESTQM/MyTestQ (Note the 3 “/“ after “queue:” as apposed to the correct 2 “/“ of the previous example).
It seems its impossible to get the Camel JMS component to create a replyTo JMSQueue object correctly.

What is interesting is that if no replyTo is specified and the temp replyTo model is in use then the JMSQueue object is created perfectly , the queue name looks something like this queue://TESTQM/AMQ6634864376 which is 100% correct.

Hopefully I am making some sense here. If this is a bug as I suspect, how would I go about raising that to the correct people?

regards
Paul

On 26 Feb 2018, 12:25 +0000, Claus Ibsen <cl...@gmail.com>, wrote:
> Hi
>
> I think there is some destination resolver spi you can configure on
> the component/endpoint where you can add your java code to build the
> queue name using the IBM MQ client api.
>
>
>
> On Mon, Feb 26, 2018 at 12:42 PM, Paul Broughton Spida Solutions
> <pa...@spidasolutions.com> wrote:
> > Hi, I have a toD element in my route which sends to a jms Queue which is provided by IBM MQ. I have the CamelJMSDestinationName set to the queue and a uri which looks similar to the folowing
> > wmq:queue:placeholder?preserveMessageQos=true&amp;replyTo=myQM/myTestQ&amp;exchangePattern=inOut&amp;replyToType=shared....
> > according to my understanding of what I have read on the various forums on this I would expect this to be translated into a replyTo Queue Manager and Queue combination that MQ can understand. However, the data in replyTo is simply translated into a queue name that contains a slash with no queue manager.
> > Does anybody have any insights into how to go about setting the replyTo queue manager on such a route? I have tried setting the JMSReplyTo value in the context header but this just gets overridden by the URI value and if I dont have the URI value then camel assumes a dynamic response queue (which ironically does have the queue manager details properly populated)
> > thanks Paul
> >
> > Paul Broughton
> > Spida Solutions
> > London • Bath • UK
> > +44 (0)79 319 38243
> > +44 (0)12 4981 5081
> > www.spidasolutions.com
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2

Re: camel toD with replyTo in URI specifying IBM MQ queue manager

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I think there is some destination resolver spi you can configure on
the component/endpoint where you can add your java code to build the
queue name using the IBM MQ client api.



On Mon, Feb 26, 2018 at 12:42 PM, Paul Broughton Spida Solutions
<pa...@spidasolutions.com> wrote:
>  Hi, I have a toD element in my route which sends to a jms Queue which is provided by IBM MQ. I have the CamelJMSDestinationName set to the queue and a uri which looks similar to the folowing
> wmq:queue:placeholder?preserveMessageQos=true&amp;replyTo=myQM/myTestQ&amp;exchangePattern=inOut&amp;replyToType=shared....
> according to my understanding of what I have read on the various forums on this I would expect this to be translated into a replyTo Queue Manager and Queue combination that MQ can understand. However, the data in replyTo is simply translated into a queue name that contains a slash with no queue manager.
> Does anybody have any insights into how to go about setting the replyTo queue manager on such a route? I have tried setting the JMSReplyTo value in the context header but this just gets overridden by the URI value and if I dont have the URI value then camel assumes a dynamic response queue (which ironically does have the queue manager details properly populated)
> thanks Paul
>
> Paul Broughton
> Spida Solutions
> London • Bath • UK
> +44 (0)79 319 38243
> +44 (0)12 4981 5081
> www.spidasolutions.com
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2