You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "shashi.kant" <sh...@gmail.com> on 2013/06/03 17:20:27 UTC

Camel always sending MQRFH2 headers to target WebsphereMQ queue.

I have been trying to send message to a IBM websphere MQ queue which has to
be in IBM500 charset, MQFMT_STRING format and encoding 273 from a Camel
2.10.4 application running on jboss.tried General ways of setting the
connectionfactory properly with following values:
*connection.setTransportType(JMSC.MQJMS_CLIENT_NONJMS_MQ);
connection.setStringProperty(WMQConstants.JMS_IBM_CHARACTER_SET, "500");
connection.setStringProperty(WMQConstants.JMS_IBM_FORMAT, MQC.MQFMT_STRING);
connection.setIntProperty(WMQConstants.JMS_IBM_ENCODING, 273);
connection.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE,  
WMQConstants.WMQ_CLIENT_NONJMS_MQ);*I  have tried
*IBMWebSphereMqDestinationResolver*https://jira.springsource.org/secure/attachment/12688/IBMWebSphereMqDestinationResolver.javaBut
everytime at the Websphere MQ end MQRFH2 header is there.I can't figure out
any solution to this problem..Somebody please help me out.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-always-sending-MQRFH2-headers-to-target-WebsphereMQ-queue-tp5733713.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: Camel always sending MQRFH2 headers to target WebsphereMQ queue.

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

Please use the user mailing list / forum for question on Camel as we say here
http://camel.apache.org/discussion-forums.html

On Mon, Jun 3, 2013 at 5:20 PM, shashi.kant <sh...@gmail.com> wrote:
> I have been trying to send message to a IBM websphere MQ queue which has to
> be in IBM500 charset, MQFMT_STRING format and encoding 273 from a Camel
> 2.10.4 application running on jboss.tried General ways of setting the
> connectionfactory properly with following values:
> *connection.setTransportType(JMSC.MQJMS_CLIENT_NONJMS_MQ);
> connection.setStringProperty(WMQConstants.JMS_IBM_CHARACTER_SET, "500");
> connection.setStringProperty(WMQConstants.JMS_IBM_FORMAT, MQC.MQFMT_STRING);
> connection.setIntProperty(WMQConstants.JMS_IBM_ENCODING, 273);
> connection.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE,
> WMQConstants.WMQ_CLIENT_NONJMS_MQ);*I  have tried
> *IBMWebSphereMqDestinationResolver*https://jira.springsource.org/secure/attachment/12688/IBMWebSphereMqDestinationResolver.javaBut
> everytime at the Websphere MQ end MQRFH2 header is there.I can't figure out
> any solution to this problem..Somebody please help me out.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-always-sending-MQRFH2-headers-to-target-WebsphereMQ-queue-tp5733713.html
> Sent from the Camel Development mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Camel always sending MQRFH2 headers to target WebsphereMQ queue.

Posted by "shashi.kant" <sh...@gmail.com>.
Solved my problem by using the following snapshot at camel website...
initially i was trying at router level ..then i moved to component level
which seems logical.
Register component with camel context and then start the router.


A workaround is to use a custom DestinationResolver:

JmsComponent wmq = new JmsComponent(connectionFactory);

wmq.setDestinationResolver(new DestinationResolver(){
    public Destination resolveDestinationName(Session session, String
destinationName, boolean pubSubDomain) throws JMSException {
        MQQueueSession wmqSession = (MQQueueSession) session;
        return wmqSession.createQueue("queue:///" + destinationName +
"?targetClient=1");    }
});


*Shashi Kant *
***"Think positive and find fuel in failure"*
*+917259733668
*
http://thinkndoawesome.blogspot.com/
*System/Software Engineer*
*Hewlett-Packard India Software Operations.
*


On Wed, Jun 5, 2013 at 12:17 PM, Matt Pavlovich-2 [via Camel] <
ml-node+s465427n5733834h47@n5.nabble.com> wrote:

> Hi Sashi-
>
> Are you reading the message out of a Transmit queue (XMIT)?  Does the
> message have an XQH header? If so, we have a solution for that.
>
> Thanks,
> Matt Pavlovich
>
> Founding Partner
> Media Driver
> P: (512) 284-4330
> E: [hidden email] <http://user/SendEmail.jtp?type=node&node=5733834&i=0>
> Skype: mattrpav
>
> On Jun 3, 2013, at 11:20 AM, shashi.kant <[hidden email]<http://user/SendEmail.jtp?type=node&node=5733834&i=1>>
> wrote:
>
> > I have been trying to send message to a IBM websphere MQ queue which has
> to
> > be in IBM500 charset, MQFMT_STRING format and encoding 273 from a Camel
> > 2.10.4 application running on jboss.tried General ways of setting the
> > connectionfactory properly with following values:
> > *connection.setTransportType(JMSC.MQJMS_CLIENT_NONJMS_MQ);
> > connection.setStringProperty(WMQConstants.JMS_IBM_CHARACTER_SET, "500");
> > connection.setStringProperty(WMQConstants.JMS_IBM_FORMAT,
> MQC.MQFMT_STRING);
> > connection.setIntProperty(WMQConstants.JMS_IBM_ENCODING, 273);
> > connection.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE,
> > WMQConstants.WMQ_CLIENT_NONJMS_MQ);*I  have tried
> > *IBMWebSphereMqDestinationResolver*
> https://jira.springsource.org/secure/attachment/12688/IBMWebSphereMqDestinationResolver.javaBut
> > everytime at the Websphere MQ end MQRFH2 header is there.I can't figure
> out
> > any solution to this problem..Somebody please help me out.
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Camel-always-sending-MQRFH2-headers-to-target-WebsphereMQ-queue-tp5733713.html
> > Sent from the Camel Development mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-always-sending-MQRFH2-headers-to-target-WebsphereMQ-queue-tp5733713p5733834.html
>  To unsubscribe from Camel always sending MQRFH2 headers to target
> WebsphereMQ queue., click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5733713&code=c2hhc2hpc2tpbGxzQGdtYWlsLmNvbXw1NzMzNzEzfC0xNDMxMTY0MTkx>
> .
> 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/Camel-always-sending-MQRFH2-headers-to-target-WebsphereMQ-queue-tp5733713p5734006.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: Camel always sending MQRFH2 headers to target WebsphereMQ queue.

Posted by Matt Pavlovich <ma...@mediadriver.com>.
Hi Sashi-

Are you reading the message out of a Transmit queue (XMIT)?  Does the message have an XQH header? If so, we have a solution for that.

Thanks,
Matt Pavlovich

Founding Partner
Media Driver
P: (512) 284-4330
E: matt@mediadriver.com
Skype: mattrpav

On Jun 3, 2013, at 11:20 AM, shashi.kant <sh...@gmail.com> wrote:

> I have been trying to send message to a IBM websphere MQ queue which has to
> be in IBM500 charset, MQFMT_STRING format and encoding 273 from a Camel
> 2.10.4 application running on jboss.tried General ways of setting the
> connectionfactory properly with following values:
> *connection.setTransportType(JMSC.MQJMS_CLIENT_NONJMS_MQ);
> connection.setStringProperty(WMQConstants.JMS_IBM_CHARACTER_SET, "500");
> connection.setStringProperty(WMQConstants.JMS_IBM_FORMAT, MQC.MQFMT_STRING);
> connection.setIntProperty(WMQConstants.JMS_IBM_ENCODING, 273);
> connection.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE,  
> WMQConstants.WMQ_CLIENT_NONJMS_MQ);*I  have tried
> *IBMWebSphereMqDestinationResolver*https://jira.springsource.org/secure/attachment/12688/IBMWebSphereMqDestinationResolver.javaBut
> everytime at the Websphere MQ end MQRFH2 header is there.I can't figure out
> any solution to this problem..Somebody please help me out.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-always-sending-MQRFH2-headers-to-target-WebsphereMQ-queue-tp5733713.html
> Sent from the Camel Development mailing list archive at Nabble.com.