ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » how to set destination queue manager in java camel

Post new topic  Reply to topic
 how to set destination queue manager in java camel « View previous topic :: View next topic » 
Author Message
mvs
PostPosted: Thu Apr 17, 2025 5:52 am    Post subject: how to set destination queue manager in java camel Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Hello Team,
We are migrating our application from IIB V10.23 to Java and using Apache Camel routers to connect to MQ.

In IIB ESQL :
----------------
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = Environment.Variables.CBHInboundQ;
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueManagerName = Environment.Variables.CBHInboundQMgr;

------------------
In Java Camel Router:
We are able to set the queue name with the following statement, which works fine:


from("mq1:queue:" + failQ + DISABLE_REPLY_TO_TRUE)
.process(e-> { e.getIn().setBody("somemessage"); })
.toD("mq1:queue:" +"QName")


However, when we add the queue manager, it fails:

from("mq1:queue:" + failQ + DISABLE_REPLY_TO_TRUE)
.process(e-> { e.getIn().setBody("somemessage"); })
.toD("mq1:queue:" +"QName" +"queueManagerName=QMGR")


Error:
There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{queueManagerName
------------------------------------


Any help to resolve the issue is greatly appreciated.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Apr 18, 2025 5:16 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

did you try setting the qmgr first (before setting the qname)?
JMS uses
Code:
"queue://qmname/qname[?option=value[&option=value]]"
"queue:///qname[?option=value[&option=value]]"

If you default the qmgr to "" i.e. queue:/// the assumed qmgr is the one you are connected to.
Hope it helps
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mvs
PostPosted: Fri Apr 18, 2025 12:02 pm    Post subject: Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Thanks for Response @fjb_saper.
It didn't work, still getting the same error
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Apr 21, 2025 4:51 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

mvs wrote:
Thanks for Response @fjb_saper.
It didn't work, still getting the same error


mvs wrote:
Code:
from("mq1:queue:" + failQ + DISABLE_REPLY_TO_TRUE)
.process(e-> { e.getIn().setBody("somemessage"); })
.toD("mq1:queue:" +"QName" +"queueManagerName=QMGR")


Have you tried ?
Code:
from("mq1:queue:" + failQ + DISABLE_REPLY_TO_TRUE)
.process(e-> { e.getIn().setBody("somemessage"); })
.toD("mq1:queue:" + "//" +"queueManagerName" + "/" + "QName")


Hope it helps
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » how to set destination queue manager in java camel
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.