activemq

Error in setExceptionListener in sending message via JmsTemplate to ActivemQ (as external broker of Jboss-eap)

蹲街弑〆低调 提交于 2019-12-08 06:39:30
Based on this article , I've connected Jboss eap 6.2 to an external ActivemQ 5.9.0 . For sending/receiving message i'm using JmsTemplate and DefaultMessageListenerContainer in spring-jms 4.1.1 . Receiving message is working fine, but in sending message i get this error: 11:33:37,059 ERROR [stderr] java.lang.reflect.InvocationTargetException 11:33:37,060 ERROR [stderr] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 11:33:37,060 ERROR [stderr] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 11:33:37,060 ERROR [stderr] at sun.reflect

ActiveMQ - is it possible to acknowledge single message in CLIENT_ACKNOWLEDGE mode

青春壹個敷衍的年華 提交于 2019-12-08 06:24:33
问题 According to http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#acknowledge() A client may individually acknowledge each message as it is consumed, or it may choose to acknowledge messages as an application-defined group (which is done by calling acknowledge on the last received message of the group, thereby acknowledging all messages consumed by the session.) How can I do it in ActiveMQ? I was unable to make it work. 回答1: here is example with ActiveMQ client, import javax.jms

ActiveMQ .net client locks up

隐身守侯 提交于 2019-12-08 05:48:54
问题 I have written a windows service using the Apache.NMS and Apcahe.NMS.ActiveMQ (version 1.0) libraries. The service consumes messages from ActiveMQ from a vendor server. The service spins up a connection and listens for messages (I handle the OnMessage event) The connection is a transacted connection so I call commit after each message. When the service starts up, everything works very well and does so for a while. However, after it has run for a while, it will no longer consume messages. Even

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(); //

How to see Dequeued messages in ActiveMQ

巧了我就是萌 提交于 2019-12-08 05:44:05
问题 While reading messages from a dynamic queue(ActiveMQ)(Pending Messages=1000), i had acknowledge each message,now the number of Messages Dequeued=1000. Is there any way to place all dequeued messages again into Queue. Any solution to get all messages backup physically. Thanks in advance 回答1: Once broker get acknowledgment from consumer, it removes message from persistence store [KahaDB/database as per configuration] of broker. Hence if you have sent all messages to another queue or broker from

Apollo activemq AMQP NullPointerException

别说谁变了你拦得住时间么 提交于 2019-12-08 05:22:58
问题 Getting following exception while trying to post a Java object. Any pointers are appreciated. > 2015-12-26 23:06:32,876 | WARN | stackref=151df5b0a0f > java.lang.NullPointerException at > org.apache.activemq.apollo.broker.QueueEntry$Swapped.swapped_in(QueueEntry.scala:809) > at > org.apache.activemq.apollo.broker.QueueEntry$Swapped$$anonfun$swap_in$1$$anonfun$apply$2.apply$mcV$sp(QueueEntry.scala:764) > at > org.apache.activemq.apollo.util.DeferringDispatched$$anon$1.run(Dispatched.scala:38)

Dynamic routing in camel en-queues messages infinitely

左心房为你撑大大i 提交于 2019-12-08 03:49:25
问题 I am working on camel’s dynamic router to derive and dispatch to the relevant queue by referring http://camel.apache.org/dynamic-router.html Following is the camel config xml: <route id="dynamicRouter" autoStartup="true"> <from uri="vm://service1?concurrentConsumers=10&timeout=0" /> <choice> <when> <simple>${body.documentStatus} == 'SUCCESS' </simple> <log message="routing to dynamic router" /> <dynamicRouter> <!-- use a method call on a bean as dynamic router --> <method ref="messageRouter"

ActiveMQ performance in different Operating Systems

可紊 提交于 2019-12-08 03:17:27
I have tested activeMQ JMSProducer in some operating systems. The results are as follows: AIX - Persistent - around 50 messages per second Solaris - Persistent - around 60 messages per second Linux - Persistent - around 500 messages per second Is that normal behaviour because in Linux, it is much much faster? ActiveMQ Performance document is only based on Linux. And, does Slow KahaDB access slow down activeMQ performance? Thanks. With persisted connections you are highly dependant on the performance of your hardware and how the OS will commit write to disk. If you enable the write cache on

get all Queue from activeMQ

梦想与她 提交于 2019-12-08 03:17:08
问题 I am new to activeMQ . I need to write code to get all the Queues and read the messages. I did not find any API like get all Queues. How can I read the Queues from ActiveMQ .If possible some example will be helpful. 回答1: Get all Queues in ActiveMQ in java. Add Below Maven dependencies in pom.xml <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> <version>4.3.2.RELEASE</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId

ActiveMQ without persistence

点点圈 提交于 2019-12-08 02:14:39
问题 I'd like to set up a publisher-subscriber based communication protocol between a server producing messages and many clients receiving them. After a bit of research, I decided to go with ActiveMQ. I looked at a few tutorials and the ActiveMQ site and set up the broker as follows: BrokerService broker = new BrokerService(); broker.setPersistent(false); broker.addConnector("tcp://localhost:61616"); broker.start(); I only need the message passing functionality, no database persistence or anything