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 » General Discussion » connecting to IBMMQ using Apache Camel AMQP

Post new topic  Reply to topic
 connecting to IBMMQ using Apache Camel AMQP « View previous topic :: View next topic » 
Author Message
mayur_bm
PostPosted: Tue Jun 18, 2024 7:26 am    Post subject: connecting to IBMMQ using Apache Camel AMQP Reply with quote

Newbie

Joined: 29 Apr 2022
Posts: 4

Hi,
using below camel context, i could connect and read events from IBMMQ queue (version 9.3.5)

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/blueprint" xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint https://camel.apache.org/schema/blueprint/camel-blueprint-3.3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

<bean id="jmsConnectionFactory" class="org.apache.qpid.jms.JmsConnectionFactory" >
<property name="username" value="xxx"/>
<property name="password" value="xxxxx"/>
<property name="remoteURI" value="amqp://xx.xxx.14.149:5672" />
</bean>

<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route id="amqpGetMessages">
<from uri="amqp:queue:demo?connectionFactory=#jmsConnectionFactory&amp;acknowledgementModeName=CLIENT_ACKNOWLEDGE&amp;maxConcurrentConsumers=1"/>
<log message="${body}"/>
</route>
</camelContext>

</blueprint>


but i see that message will be read but not getting deleted from Queue

getting below error messages

17:50:05.665 WARN [Camel (camel-6) thread #7 - JmsConsumer[DEV.QUEUE.1]] Execution of JMS message listener failed. Caused by: [org.apache.camel.RuntimeCamelException - org.springframework.jms.InvalidDestinationException: AMQXR2091E: An error occurred putting a message to queue '
' from ClientIdentifier 'ID:d999b500-e5bf-4369-9fb7-fb7062b2bd1b:1' UserName 'mxxxxx' on channel 'amqp'. A reason code of '2,085' 'MQRC_UNKNOWN_OBJECT_NAME' was received during an 'MQOPEN' operation for object ''. [condition = amqp:not-found]; nested exception is javax.jms.InvalidDestinationException: AMQXR2091E: An error occurred putting a message to queue ' ' from ClientIdentifier 'ID:d999b500-e5bf-4369-9fb7-fb7062b2bd1b:1' UserName 'mxxxxx' on channel 'amqp'. A reason code of '2,085' 'MQRC_UNKNOWN_OBJECT_NAME' was received during an 'MQOPEN' operation for object ''. [condition = amqp:not-found]]
org.apache.camel.RuntimeCamelException: org.springframework.jms.InvalidDestinationException: AMQXR2091E: An error occurred putting a message to queue ' ' from ClientIdentifier 'ID:d999b500-e5bf-4369-9fb7-fb7062b2bd1b:1' UserName 'mxxxxx' on channel 'amqp'. A reason code of '2,085' 'MQRC_UNKNOWN_OBJECT_NAME' was received during an 'MQOPEN' operation for object ''. [condition = amqp:not-found]; nested exception is javax.jms.InvalidDestinationException: AMQXR2091E: An error occurred putting a message to queue ' ' from ClientIdentifier 'ID:d999b500-e5bf-4369-9fb7-fb7062b2bd1b:1' UserName 'mxxxxx' on channel 'amqp'. A reason code of '2,085' 'MQRC_UNKNOWN_OBJECT_NAME' was received during an 'MQOPEN' operation for object ''. [condition = amqp:not-found]
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1826) ~[!/:2.24.2]
at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:134) ~[!/:2.24.2]
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:736) ~[!/:?]
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:696) [!/:?]
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:674) [!/:?]
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:318) [!/:?]
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:257) [!/:?]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1189) [!/:?]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1179) [!/:?]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1076) [!/:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_392-392]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_392-392]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_392-392]
Caused by: org.springframework.jms.InvalidDestinationException: AMQXR2091E: An error occurred putting a message to queue '
' from ClientIdentifier 'ID:d999b500-e5bf-4369-9fb7-fb7062b2bd1b:1' UserName 'mxxxxx' on channel 'amqp'. A reason code of '2,085' 'MQRC_UNKNOWN_OBJECT_NAME' was received during an 'MQOPEN' operation for object ''. [condition = amqp:not-found]; nested exception is javax.jms.InvalidDestinationException: AMQXR2091E: An error occurred putting a message to queue ' ' from ClientIdentifier 'ID:d999b500-e5bf-4369-9fb7-fb7062b2bd1b:1' UserName 'mxxxxx' on channel 'amqp'. A reason code of '2,085' 'MQRC_UNKNOWN_OBJECT_NAME' was received during an 'MQOPEN' operation for object ''. [condition = amqp:not-found]
at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:280) ~[!/:?]
at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:185) ~[!/:?]
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:507) ~[!/:?]
at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:556) ~[!/:2.24.2]
at org.apache.camel.component.jms.EndpointMessageListener.sendReply(EndpointMessageListener.java:370) ~[!/:2.24.2]
at org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:223) ~[!/:2.24.2]
at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:117) ~[!/:2.24.2]
... 11 more
Caused by: javax.jms.InvalidDestinationException: AMQXR2091E: An error occurred putting a message to queue '
' from ClientIdentifier 'ID:d999b500-e5bf-4369-9fb7-fb7062b2bd1b:1' UserName 'mxxxxx' on channel 'amqp'. A reason code of '2,085' 'MQRC_UNKNOWN_OBJECT_NAME' was received during an 'MQOPEN' operation for object ''. [condition = amqp:not-found]
at org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:153) ~[!/:?]
at org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:118) ~[!/:?]
at org.apache.qpid.jms.provider.amqp.AmqpFixedProducer.applyDeliveryStateUpdate(AmqpFixedProducer.java:246) ~[!/:?]
at org.apache.qpid.jms.provider.amqp.AmqpFixedProducer.processDeliveryUpdates(AmqpFixedProducer.java:217) ~[!/:?]
at org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:962) ~[!/:?]
at org.apache.qpid.jms.provider.amqp.AmqpProvider.onData(AmqpProvider.java:824) ~[!/:?]
at org.apache.qpid.jms.transports.netty.NettyTcpTransport$NettyTcpTransportHandler.channelRead0(NettyTcpTransport.java:539) ~[!/:?]
at org.apache.qpid.jms.transports.netty.NettyTcpTransport$NettyTcpTransportHandler.channelRead0(NettyTcpTransport.java:532) ~[!/:?]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[!/:4.1.32.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[!/:4.1.32.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[!/:4.1.32.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[!/:4.1.32.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) ~[!/:4.1.32.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[!/:4.1.32.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[!/:4.1.32.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) ~[!/:4.1.32.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) ~[!/:4.1.32.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:656) ~[!/:4.1.32.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:591) ~[!/:4.1.32.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:508) ~[!/:4.1.32.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470) ~[!/:4.1.32.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) ~[!/:4.1.32.Final]
... 1 more
17:50:05.668 INFO [Camel (camel-6) thread #7 - JmsConsumer[DEV.QUEUE.1]] demo67777!

how to fix this issue?

Best Regards,
Mayur
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Tue Jun 18, 2024 3:31 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

Quote:
A reason code of '2,085' 'MQRC_UNKNOWN_OBJECT_NAME' was received during an 'MQOPEN' operation for object ''

MQ object name (aka queue name) is blank ?
The URI needs to include a path on the end?
_________________
Glenn
Back to top
View user's profile Send private message
mayur_bm
PostPosted: Tue Jun 18, 2024 3:53 pm    Post subject: Reply with quote

Newbie

Joined: 29 Apr 2022
Posts: 4

Dear Glenn,

for this question "The URI needs to include a path on the end?"

can you please provide an example, how to include this in URI?

Best Regards,
Mayur
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Thu Jun 20, 2024 5:08 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

I haven't used amqp. I googled for "amqp uri format", which led to
https://docs.oasis-open.org/amqp/addressing/v1.0/csd01/addressing-v1.0-csd01.html#_Toc69731044

AMQP URLs with a network endpoint and a path. Those URIs identify the container reachable via the network endpoint and the node identified by the path:
? amqp://endpoint.example.com/queue

? amqp://endpoint.example.com/area/queue

I do not know if this is significant. I suggest that you do some more research.
_________________
Glenn
Back to top
View user's profile Send private message
miibm
PostPosted: Thu Jun 27, 2024 2:02 am    Post subject: Re: connecting to IBMMQ using Apache Camel AMQP Reply with quote

Newbie

Joined: 03 Jun 2021
Posts: 2

Looks like the error OBJECT_NAME is blank
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » connecting to IBMMQ using Apache Camel AMQP
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.