You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by nigel <ni...@pimco.com> on 2013/09/30 20:33:17 UTC

SJMS component and IBM Websphere MQ quirks

Guys,
I've bumped into a bug using sjms with IBM MQ. All works fine using topics,
but with queues my reply messages are rejected as with a 2027 error (no
reply destination).  One of the MQ headers is the JMS_IBM_MsgType, which,
because the incoming message wants a reply, is of type MQMT_REQUEST. IBM
expects messages of this type to have the JMSReplyTo property set as well.
The SJMS component doesn't copy the replyTo property from the exchange
headers to the reply message and so causes the exception. Looking at the JMS
component I see that it copies the reply destination into the reply and all
the other MQ specific headers, so it works - however it makes no sense to
copy the reply into the reply! Anyhow I thought I'd try adding a
headerFilterStrategy to remove all the IBM specific properties - but alas it
seems the SJMS component doesn't actually use the filter anywhere. 
Is there an alternative approach. My other hack was to force the
JMS_IBM_MsgType to 2 in the reply (which is what IBM wants it to be
(http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/index.jsp?topic=%2Fcom.ibm.mq.msc.doc%2Fprp_jms_ibm_msgtype.html).

Cheers
Nigel
BTW - I much prefer the sjms over the jms - had weird infinite loops when an
app sends a message to one of its own queues wanting a reply - I suspect
this is due to the reply destination copying!!!



--
View this message in context: http://camel.465427.n5.nabble.com/SJMS-component-and-IBM-Websphere-MQ-quirks-tp5740588.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: SJMS component and IBM Websphere MQ quirks

Posted by Scott England-Sullivan <su...@gmail.com>.
Hi Nigel,

Sorry to hear you are having issues with the component.  Sounds like there
are several bugs here.

I will have to take a look this week to see if I can clean this up.

Thanks for the feedback.

Best Regards,
Scott ES


On Mon, Sep 30, 2013 at 2:21 PM, nigel <ni...@pimco.com> wrote:

> A workaround I'm using is to add a processor on the end of my pipeline to
> remove the JMS_IBM_MsgType property. When I do this Websphere is fine (uses
> a datagram type for the reply though - I guess I could set it explicitly to
> 2).
> eg:
>  .process(new Processor() {
>                         @Override
>                         public void process(Exchange exchange) throws
> Exception {
>
> exchange.getIn().removeHeader("JMS_IBM_MsgType");
>                         }
>                     })
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/SJMS-component-and-IBM-Websphere-MQ-quirks-tp5740588p5740596.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
-- 
Scott England-Sullivan
Apache Camel Committer
Principal Consultant / Sr. Architect | Red Hat, Inc.
FuseSource is now part of Red Hat
Web:     fusesource.com <http://www.fusesource.com> |
redhat.com<http://www.redhat.com>
Blog:     sully6768.blogspot.com
Twitter: sully6768

Re: SJMS component and IBM Websphere MQ quirks

Posted by nigel <ni...@pimco.com>.
Ah - no I didn't - that's much neater. Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/SJMS-component-and-IBM-Websphere-MQ-quirks-tp5740588p5740699.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: SJMS component and IBM Websphere MQ quirks

Posted by Dale King <da...@jadabeauty.com>.
You do know that you can shorten that to just:

	.removeHeader("JMS_IBM_MsgType")


On Sep 30, 2013, at 3:21 PM, nigel <ni...@pimco.com> wrote:

> A workaround I'm using is to add a processor on the end of my pipeline to
> remove the JMS_IBM_MsgType property. When I do this Websphere is fine (uses
> a datagram type for the reply though - I guess I could set it explicitly to
> 2).
> eg:
> .process(new Processor() {
>                        @Override
>                        public void process(Exchange exchange) throws
> Exception {
> 
> exchange.getIn().removeHeader("JMS_IBM_MsgType");
>                        }
>                    })
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/SJMS-component-and-IBM-Websphere-MQ-quirks-tp5740588p5740596.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: SJMS component and IBM Websphere MQ quirks

Posted by nigel <ni...@pimco.com>.
A workaround I'm using is to add a processor on the end of my pipeline to
remove the JMS_IBM_MsgType property. When I do this Websphere is fine (uses
a datagram type for the reply though - I guess I could set it explicitly to
2).
eg:
 .process(new Processor() {
                        @Override
                        public void process(Exchange exchange) throws
Exception {
                           
exchange.getIn().removeHeader("JMS_IBM_MsgType");
                        }
                    })



--
View this message in context: http://camel.465427.n5.nabble.com/SJMS-component-and-IBM-Websphere-MQ-quirks-tp5740588p5740596.html
Sent from the Camel - Users mailing list archive at Nabble.com.