apache-nms

ActiveMQ - Do I need to re-subscribe to a queue after the Listener event fires?

别说谁变了你拦得住时间么 提交于 2019-12-25 11:42:13
问题 I am integrating with an ActiveMQ JMS system using the Apache.NMS library. For the response queue listener, it's not clear whether the consumer is disposed after a message is received. Here are excerpts from the solution: var destination = getDestination(session, Settings.Instance.OutboundQueue); // Create a consumer and producer using (var consumer = session.CreateConsumer(destination)) { // Start the connection so that messages will be processed. connection.Start(); consumer.Listener +=

Why Active MQ Consumer is not recieving any message even if it is online?

六眼飞鱼酱① 提交于 2019-12-24 03:03:16
问题 Consumer Created. Producer created. Msg Sent. Msg Enqueued in the Queue. But Msg not dequeued (even though there is a consumer online for that queue). There is no error logged on the system. So What could be the reason for it? 回答1: If you haven't called connection.start() then your consumer won't receive anything. If you have and its still not working then we'd need to see some code in order to help figure it out. 来源: https://stackoverflow.com/questions/10349077/why-active-mq-consumer-is-not

Why Active MQ Consumer is not recieving any message even if it is online?

与世无争的帅哥 提交于 2019-12-24 03:03:01
问题 Consumer Created. Producer created. Msg Sent. Msg Enqueued in the Queue. But Msg not dequeued (even though there is a consumer online for that queue). There is no error logged on the system. So What could be the reason for it? 回答1: If you haven't called connection.start() then your consumer won't receive anything. If you have and its still not working then we'd need to see some code in order to help figure it out. 来源: https://stackoverflow.com/questions/10349077/why-active-mq-consumer-is-not

Why is consumer not created for ActiveMQ Temp Queue?

◇◆丶佛笑我妖孽 提交于 2019-12-08 05:44:16
问题 Except SimpleMessageListenerContainer option, the consumer is not created for temp queue. I will not use SimpleMessageListenerContainer for some issues faced here. Following code is not working...(even the temp queue is not created) using (IConnection connection = connectionFactory.CreateConnection()) using (ISession session = connection.CreateSession()) { IDestination destination = SessionUtil.GetDestination(session, aQueueName); var replyDestination = session.CreateTemporaryQueue(); //

ActiveMQ NMS: connection.start() hangs with Failover protocol when broker is down

浪子不回头ぞ 提交于 2019-12-04 12:43:15
I have C# application using nms.activemq 1.5.0. When my application starts it tries to connect to the broker using failover protocol (I have two brokers in master-slave configuration). If both brokers down my application is stuck in wait because of the connection.start() . I tried every bit of info i found on the web - I tried every attribute of the failover protocol, also tried setting the connection timeout, tried transport.requesttimeout . I also tried a newer version of nms.activemq, but nothing seems to solve the issue. Any idea on what can cause this problem or any workaround?

ActiveMQ with C# and Apache NMS - Count messages in queue

笑着哭i 提交于 2019-11-27 07:21:02
问题 I'm using ActiveMQ to send and receive messages using a C# app. However I'm having some difficulty just getting a count of the messages in the queue.. Here's my code: public int GetMessageCount() { int messageCount = 0; Uri connecturi = new Uri(this.ActiveMQUri); IConnectionFactory factory = new NMSConnectionFactory(connecturi); using (IConnection connection = factory.CreateConnection()) using (ISession session = connection.CreateSession()) { IDestination requestDestination = SessionUtil