|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
how to set destination queue manager in java camel |
« View previous topic :: View next topic » |
Author |
Message
|
mvs |
Posted: Thu Apr 17, 2025 5:52 am Post subject: how to set destination queue manager in java camel |
|
|
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 |
|
 |
fjb_saper |
Posted: Fri Apr 18, 2025 5:16 am Post subject: |
|
|
 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 |
|
 |
mvs |
Posted: Fri Apr 18, 2025 12:02 pm Post subject: |
|
|
Voyager
Joined: 06 Jul 2007 Posts: 85
|
Thanks for Response @fjb_saper.
It didn't work, still getting the same error |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Apr 21, 2025 4:51 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|