Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0976B19A7F for ; Thu, 7 Apr 2016 10:22:57 +0000 (UTC) Received: (qmail 74790 invoked by uid 500); 7 Apr 2016 10:22:56 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 74743 invoked by uid 500); 7 Apr 2016 10:22:56 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 71213 invoked by uid 99); 7 Apr 2016 10:21:17 -0000 X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.292 X-Spam-Level: * X-Spam-Status: No, score=1.292 tagged_above=-999 required=6.31 tests=[RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled In-Reply-To: <1460021159780-5780662.post@n5.nabble.com> References: <1460021159780-5780662.post@n5.nabble.com> From: #S-SmixDev Subject: Re: JMS vs MQ message X-KeepSent: E43093C3:F5F1C07E-C1257F8E:00389C92; type=4; name=$KeepSent To: users@camel.apache.org X-Mailer: Lotus Notes Release 8.5.3FP6 November 22, 2013 Sender: Jens Kleine-Herzbruch Message-ID: Date: Thu, 7 Apr 2016 12:20:57 +0200 X-MIMETrack: Serialize by Router on DSCC1201/SERVER/DZ COM(Release 8.5.3FP6 HF2202|November 16, 2015) at 07.04.2016 12:20:59 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-TBoneOriginalFrom: #S-SmixDev X-TBoneOriginalTo: users@camel.apache.org X-TBoneOriginalSender: Jens Kleine-Herzbruch X-TBoneDomainSigned: false targetClient=1 means there are no headers except the standard properties from the MQMD header on the message. You can not send custom headers that way. And specifying the targetClient does not have any effect whatsoever when reading messages from a queue. Regards, Jens Von: blommis An: users@camel.apache.org, Datum: 07.04.2016 11:31 Betreff: JMS vs MQ message I'm trying to receive a JMS message and send it to a MQ queue, keeping headers on the message. But headers are sent when using targetClient=1. So when using the following, no headers are sent. from("*wmq:queue:A0*").log("${headers}"); template.sendBodyAndHeader("*wmq:queue:A0*", "body", "h1", "headervalue"); However, when having a component called wmqJms (using wmq but without targetClient=1), it does read headers, even if I have from wmq. But then when forwarding the message to a wmq component (targetClient=1), there is no headers on the A1 queue from("*wmq:queue:A0*").log("${headers}").to("wmq:queue:A1"); template.sendBodyAndHeader("*wmqJms:queue:A0*", "body", "h1", "headervalue"); public static Component createMQComponent(Properties properties) throws JMSException { JmsComponent jmsComponent = getJmsComponent(properties); jmsComponent.setDestinationResolver(new DestinationResolver() { @Override public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException { MQQueueSession mqSession = (MQQueueSession) session; return session.createQueue("queue:///" + destinationName + "?targetClient=1"); } }); return jmsComponent; } private static JmsComponent getJmsComponent(Properties properties) throws JMSException { return MQComponentBuilder.mqComponent( properties.getPropertyNotNull("wmq.hostname"), Integer.parseInt(properties.getPropertyNotNull("wmq.port")), properties.getPropertyNotNull("wmq.username"), properties.getPropertyNotNull("wmq.password"), properties.getPropertyNotNull("wmq.queueManager"), properties.getPropertyNotNull("wmq.channel") ); } -- View this message in context: http://camel.465427.n5.nabble.com/JMS-vs-MQ-message-tp5780662.html Sent from the Camel - Users mailing list archive at Nabble.com.