Unable to suscribe to JMS using stomp-jms.topic.testTopic creating subscription with filter null: java.lang.Exception: trace
mick2004 Jul 5, 2015 12:40 PMHi,
I am trying to connect JBOSS hornet Q using below c# code.Although I am able to write on queues using c# but unable subscribe queues.
Uri connecturi = new Uri("stomp:tcp://localhost:61613");
Console.WriteLine("About to connect to " + connecturi);
// NOTE: ensure the nmsprovider-activemq.config file exists in the executable folder.
IConnectionFactory factory = new NMSConnectionFactory(connecturi);
using (IConnection connection = factory.CreateConnection())
using (ISession session = connection.CreateSession())
{
IDestination destination = SessionUtil.GetDestination(session, "topic://testTopic");
Console.WriteLine("Using destination: " + destination);
// Create a consumer and producer
using (IMessageConsumer consumer = session.CreateConsumer(destination))
using (IMessageProducer producer = session.CreateProducer(destination))
{
// Start the connection so that messages will be processed.
connection.Start();
//producer.Persistent = true;
producer.RequestTimeout = receiveTimeout;
consumer.Listener += new MessageListener(OnMessage);
// Send a message
ITextMessage request = session.CreateTextMessage("Hello World!");
request.NMSCorrelationID = "abc";
request.Properties["NMSXGroupID"] = "cheese";
request.Properties["myHeader"] = "Cheddar";
producer.Send(request);
if (message == null)
{
Console.WriteLine("No message received!");
}
else
{
Console.WriteLine("Received message with ID: " + message.NMSMessageId);
Console.WriteLine("Received message with text: " + message.Text);
}
}
}
Console.ReadLine();
I can see in logs few debug statements figuring something wrong corresponding to message but cant figure the rootcause.
2015-06-14 22:55:55,036 DEBUG [org.hornetq.jms.server] (Periodic Recovery) looking for recover at DelegatingSession [session=ClientSessionImpl [name=62a9371a-12b7-11e5-be5f-b96699768a76, username=null, closed=false, factory = ClientSessionFactoryImpl [serverLocator=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=15a94d14-12b7-11e5-be5f-b96699768a76, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0], discoveryGroupConfiguration=null], connectorConfig=TransportConfiguration(name=15a94d14-12b7-11e5-be5f-b96699768a76, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0, backupConfig=null], metaData=()]@10eaae0e] configuration [XARecoveryConfig [transportConfiguration = [TransportConfiguration(name=15a94d14-12b7-11e5-be5f-b96699768a76, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0], discoveryConfiguration = null, username=null, password=****]]
2015-06-14 22:56:02,756 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) jms.topic.testTopic creating subscription 10737418291 with filter null: java.lang.Exception: trace
at org.hornetq.core.paging.cursor.impl.PageCursorProviderImpl.createSubscription(PageCursorProviderImpl.java:96) [hornetq-server-2.4.1.Final.jar:]
at org.hornetq.core.server.impl.HornetQServerImpl.createQueue(HornetQServerImpl.java:1929) [hornetq-server-2.4.1.Final.jar:]
at org.hornetq.core.server.impl.HornetQServerImpl.createQueue(HornetQServerImpl.java:1152) [hornetq-server-2.4.1.Final.jar:]
at org.hornetq.core.server.impl.ServerSessionImpl.createQueue(ServerSessionImpl.java:452) [hornetq-server-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.StompSession.addSubscription(StompSession.java:296) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.StompProtocolManager.createSubscription(StompProtocolManager.java:405) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.StompConnection.subscribe(StompConnection.java:711) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.VersionedStompFrameHandler.onSubscribe(VersionedStompFrameHandler.java:307) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.VersionedStompFrameHandler.handleFrame(VersionedStompFrameHandler.java:104) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.StompConnection.handleFrame(StompConnection.java:525) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.StompProtocolManager.handleBuffer(StompProtocolManager.java:157) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.StompConnection.bufferReceived(StompConnection.java:352) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:635) [hornetq-server-2.4.1.Final.jar:]
at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.channelRead(HornetQChannelHandler.java:73) [hornetq-core-client-2.4.1.Final.jar:]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:132) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:485) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:452) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:346) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_45]
2015-06-14 22:56:02,758 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) Adding binding LocalQueueBinding [address=jms.topic.testTopic, queue=QueueImpl[name=6e3fcce2-12ba-11e5-be5f-b96699768a76, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=ab1255ed-12a4-11e5-b402-6d445c985eef]]@6789e0ce, filter=null, name=6e3fcce2-12ba-11e5-be5f-b96699768a76, clusterName=6e3fcce2-12ba-11e5-be5f-b96699768a76ab1255ed-12a4-11e5-b402-6d445c985eef] with address = 6e3fcce2-12ba-11e5-be5f-b96699768a76: java.lang.Exception: trace
at org.hornetq.core.postoffice.impl.SimpleAddressManager.addBinding(SimpleAddressManager.java:68) [hornetq-server-2.4.1.Final.jar:]
at org.hornetq.core.postoffice.impl.WildcardAddressManager.addBinding(WildcardAddressManager.java:96) [hornetq-server-2.4.1.Final.jar:]
at org.hornetq.core.postoffice.impl.PostOfficeImpl.addBinding(PostOfficeImpl.java:452) [hornetq-server-2.4.1.Final.jar:]
at org.hornetq.core.server.impl.HornetQServerImpl.createQueue(HornetQServerImpl.java:1956) [hornetq-server-2.4.1.Final.jar:]
at org.hornetq.core.server.impl.HornetQServerImpl.createQueue(HornetQServerImpl.java:1152) [hornetq-server-2.4.1.Final.jar:]
at org.hornetq.core.server.impl.ServerSessionImpl.createQueue(ServerSessionImpl.java:452) [hornetq-server-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.StompSession.addSubscription(StompSession.java:296) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.StompProtocolManager.createSubscription(StompProtocolManager.java:405) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.StompConnection.subscribe(StompConnection.java:711) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.VersionedStompFrameHandler.onSubscribe(VersionedStompFrameHandler.java:307) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.VersionedStompFrameHandler.handleFrame(VersionedStompFrameHandler.java:104) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.StompConnection.handleFrame(StompConnection.java:525) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.StompProtocolManager.handleBuffer(StompProtocolManager.java:157) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.protocol.stomp.StompConnection.bufferReceived(StompConnection.java:352) [hornetq-stomp-protocol-2.4.1.Final.jar:]
at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:635) [hornetq-server-2.4.1.Final.jar:]
at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.channelRead(HornetQChannelHandler.java:73) [hornetq-core-client-2.4.1.Final.jar:]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:132) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:485) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:452) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:346) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [netty-all-4.0.15.Final.jar:4.0.15.Final]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_45]
2015-06-14 22:56:02,760 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) ClusterCommunication::Sending notification for addBinding LocalQueueBinding [address=jms.topic.testTopic, queue=QueueImpl[name=6e3fcce2-12ba-11e5-be5f-b96699768a76, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=ab1255ed-12a4-11e5-b402-6d445c985eef]]@6789e0ce, filter=null, name=6e3fcce2-12ba-11e5-be5f-b96699768a76, clusterName=6e3fcce2-12ba-11e5-be5f-b96699768a76ab1255ed-12a4-11e5-b402-6d445c985eef] from server HornetQServerImpl::serverUUID=ab1255ed-12a4-11e5-b402-6d445c985eef
2015-06-14 22:56:02,760 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) Couldn't find any bindings for address=hornetq.notifications on message=ServerMessage[messageID=10737418292,durable=true,userID=null,priority=0, bodySize=512,expiration=0, durable=true, address=hornetq.notifications,properties=TypedProperties[{_HQ_NotifType=BINDING_ADDED, _HQ_Binding_ID=10737418291, _HQ_NotifTimestamp=1434302762760, _HQ_Address=jms.topic.testTopic, _HQ_RoutingName=6e3fcce2-12ba-11e5-be5f-b96699768a76, _HQ_Distance=0, _HQ_ClusterName=6e3fcce2-12ba-11e5-be5f-b96699768a76ab1255ed-12a4-11e5-b402-6d445c985eef, _HQ_Binding_Type=0, foobar=6e406923-12ba-11e5-be5f-b96699768a76}]]@901843905
2015-06-14 22:56:02,760 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) Message ServerMessage[messageID=10737418292,durable=true,userID=null,priority=0, bodySize=512,expiration=0, durable=true, address=hornetq.notifications,properties=TypedProperties[{_HQ_NotifType=BINDING_ADDED, _HQ_Binding_ID=10737418291, _HQ_NotifTimestamp=1434302762760, _HQ_Address=jms.topic.testTopic, _HQ_RoutingName=6e3fcce2-12ba-11e5-be5f-b96699768a76, _HQ_Distance=0, _HQ_ClusterName=6e3fcce2-12ba-11e5-be5f-b96699768a76ab1255ed-12a4-11e5-b402-6d445c985eef, _HQ_Binding_Type=0, foobar=6e406923-12ba-11e5-be5f-b96699768a76}]]@901843905 is not going anywhere as it didn't have a binding on address:hornetq.notifications
2015-06-14 22:56:02,761 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) registered address org.hornetq:module=Core,type=Address,name="jms.topic.testTopic"
2015-06-14 22:56:02,761 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) registered queue org.hornetq:module=Core,type=Queue,address="jms.topic.testTopic",name="6e3fcce2-12ba-11e5-be5f-b96699768a76"
2015-06-14 22:56:02,761 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) Queue 6e3fcce2-12ba-11e5-be5f-b96699768a76 created on address 6e3fcce2-12ba-11e5-be5f-b96699768a76 with filter=null temporary = true durable=false on session user=, connection=org.hornetq.core.protocol.stomp.StompConnection@1fad5a95
2015-06-14 22:56:02,761 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) QueueImpl[name=6e3fcce2-12ba-11e5-be5f-b96699768a76, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=ab1255ed-12a4-11e5-b402-6d445c985eef]]@6789e0ce adding consumer ServerConsumerImpl [id=10737418289, filter=null, binding=LocalQueueBinding [address=jms.topic.testTopic, queue=QueueImpl[name=6e3fcce2-12ba-11e5-be5f-b96699768a76, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=ab1255ed-12a4-11e5-b402-6d445c985eef]]@6789e0ce, filter=null, name=6e3fcce2-12ba-11e5-be5f-b96699768a76, clusterName=6e3fcce2-12ba-11e5-be5f-b96699768a76ab1255ed-12a4-11e5-b402-6d445c985eef]]
2015-06-14 22:56:02,762 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) Session with user=, connection=org.hornetq.core.protocol.stomp.StompConnection@1fad5a95 created a consumer on queue 6e3fcce2-12ba-11e5-be5f-b96699768a76, filter = null
2015-06-14 22:56:02,762 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) Couldn't find any bindings for address=hornetq.notifications on message=ServerMessage[messageID=10737418293,durable=true,userID=null,priority=0, bodySize=512,expiration=0, durable=true, address=hornetq.notifications,properties=TypedProperties[{_HQ_NotifType=CONSUMER_CREATED, _HQ_RemoteAddress=/127.0.0.1:57537, _HQ_NotifTimestamp=1434302762762, _HQ_Address=jms.topic.testTopic, _HQ_RoutingName=6e3fcce2-12ba-11e5-be5f-b96699768a76, _HQ_Distance=0, _HQ_ConsumerCount=1, _HQ_ClusterName=6e3fcce2-12ba-11e5-be5f-b96699768a76ab1255ed-12a4-11e5-b402-6d445c985eef, _HQ_User=, _HQ_SessionName=6e3fcce1-12ba-11e5-be5f-b96699768a76}]]@1898288895
2015-06-14 22:56:02,762 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) Message ServerMessage[messageID=10737418293,durable=true,userID=null,priority=0, bodySize=512,expiration=0, durable=true, address=hornetq.notifications,properties=TypedProperties[{_HQ_NotifType=CONSUMER_CREATED, _HQ_RemoteAddress=/127.0.0.1:57537, _HQ_NotifTimestamp=1434302762762, _HQ_Address=jms.topic.testTopic, _HQ_RoutingName=6e3fcce2-12ba-11e5-be5f-b96699768a76, _HQ_Distance=0, _HQ_ConsumerCount=1, _HQ_ClusterName=6e3fcce2-12ba-11e5-be5f-b96699768a76ab1255ed-12a4-11e5-b402-6d445c985eef, _HQ_User=, _HQ_SessionName=6e3fcce1-12ba-11e5-be5f-b96699768a76}]]@1898288895 is not going anywhere as it didn't have a binding on address:hornetq.notifications
2015-06-14 22:56:02,762 DEBUG [org.hornetq.core.server] (Thread-29 (HornetQ-server-HornetQServerImpl::serverUUID=ab1255ed-12a4-11e5-b402-6d445c985eef-582038124)) QueueImpl[name=6e3fcce2-12ba-11e5-be5f-b96699768a76, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=ab1255ed-12a4-11e5-b402-6d445c985eef]]@6789e0ce doing deliver. messageReferences=0
2015-06-14 22:56:02,782 DEBUG [org.hornetq.core.server] (Thread-1 (HornetQ-server-HornetQServerImpl::serverUUID=ab1255ed-12a4-11e5-b402-6d445c985eef-582038124)) QueueImpl[name=6e3fcce2-12ba-11e5-be5f-b96699768a76, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=ab1255ed-12a4-11e5-b402-6d445c985eef]]@6789e0ce doing deliver. messageReferences=0
2015-06-14 22:56:02,785 DEBUG [org.hornetq.core.server] (Thread-14 (HornetQ-server-HornetQServerImpl::serverUUID=ab1255ed-12a4-11e5-b402-6d445c985eef-582038124)) QueueImpl[name=6e3fcce2-12ba-11e5-be5f-b96699768a76, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=ab1255ed-12a4-11e5-b402-6d445c985eef]]@6789e0ce doing deliver. messageReferences=1
2015-06-14 22:56:02,786 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) Couldn't find any bindings for address=hornetq.notifications on message=ServerMessage[messageID=10737418297,durable=true,userID=null,priority=0, bodySize=512,expiration=0, durable=true, address=hornetq.notifications,properties=TypedProperties[{_HQ_FilterString=null, _HQ_NotifType=CONSUMER_CLOSED, _HQ_RemoteAddress=/127.0.0.1:57537, _HQ_NotifTimestamp=1434302762785, _HQ_Address=jms.topic.testTopic, _HQ_RoutingName=6e3fcce2-12ba-11e5-be5f-b96699768a76, _HQ_Distance=0, _HQ_ConsumerCount=0, _HQ_ClusterName=6e3fcce2-12ba-11e5-be5f-b96699768a76ab1255ed-12a4-11e5-b402-6d445c985eef, _HQ_User=, _HQ_SessionName=6e3fcce1-12ba-11e5-be5f-b96699768a76}]]@1617823990
2015-06-14 22:56:02,786 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) Message ServerMessage[messageID=10737418297,durable=true,userID=null,priority=0, bodySize=512,expiration=0, durable=true, address=hornetq.notifications,properties=TypedProperties[{_HQ_FilterString=null, _HQ_NotifType=CONSUMER_CLOSED, _HQ_RemoteAddress=/127.0.0.1:57537, _HQ_NotifTimestamp=1434302762785, _HQ_Address=jms.topic.testTopic, _HQ_RoutingName=6e3fcce2-12ba-11e5-be5f-b96699768a76, _HQ_Distance=0, _HQ_ConsumerCount=0, _HQ_ClusterName=6e3fcce2-12ba-11e5-be5f-b96699768a76ab1255ed-12a4-11e5-b402-6d445c985eef, _HQ_User=, _HQ_SessionName=6e3fcce1-12ba-11e5-be5f-b96699768a76}]]@1617823990 is not going anywhere as it didn't have a binding on address:hornetq.notifications
2015-06-14 22:56:02,787 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) deleting temporary queue 6e3fcce2-12ba-11e5-be5f-b96699768a76
2015-06-14 22:56:02,788 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) Couldn't find any bindings for address=hornetq.notifications on message=ServerMessage[messageID=10737418301,durable=true,userID=null,priority=0, bodySize=512,expiration=0, durable=true, address=hornetq.notifications,properties=TypedProperties[{_HQ_FilterString=null, _HQ_NotifType=BINDING_REMOVED, _HQ_Binding_ID=10737418291, _HQ_NotifTimestamp=1434302762788, _HQ_Address=jms.topic.testTopic, _HQ_RoutingName=6e3fcce2-12ba-11e5-be5f-b96699768a76, _HQ_Distance=0, _HQ_ClusterName=6e3fcce2-12ba-11e5-be5f-b96699768a76ab1255ed-12a4-11e5-b402-6d445c985eef}]]@104133171
2015-06-14 22:56:02,788 DEBUG [org.hornetq.core.server] (Thread-5 (hornetq-netty-threads-42370481)) Message ServerMessage[messageID=10737418301,durable=true,userID=null,priority=0, bodySize=512,expiration=0, durable=true, address=hornetq.notifications,properties=TypedProperties[{_HQ_FilterString=null, _HQ_NotifType=BINDING_REMOVED, _HQ_Binding_ID=10737418291, _HQ_NotifTimestamp=1434302762788, _HQ_Address=jms.topic.testTopic, _HQ_RoutingName=6e3fcce2-12ba-11e5-be5f-b96699768a76, _HQ_Distance=0, _HQ_ClusterName=6e3fcce2-12ba-11e5-be5f-b96699768a76ab1255ed-12a4-11e5-b402-6d445c985eef}]]@104133171 is not going anywhere as it didn't have a binding on address:hornetq.notifications
I have attached my standalone.xml.Please help.