activemq

Why is pausing a queue not a broker function?

丶灬走出姿态 提交于 2019-12-24 11:44:18
问题 I was looking for an ActiveMQ broker admin command, to tell it to pause a queue - that is: continue accepting messages from producing clients cease delivering to consuming clients, allowing the queue backlog to grow until the queue is resumed, whereupon the backlog is sent to clients. I was unable to find such a command. The commonest answer was that it should be managed at the client end -- that is, locate every consumer and stop it. Other answers were workarounds, like manipulating network

ActiveMQ: Publish Messages in bulk, persistent, but not async?

北慕城南 提交于 2019-12-24 10:04:52
问题 is it possible to store a large amount of messages in bulk? I want to send them sync, persistent, but to get speed very much at one time. I am using NMS, the .net version of the java-framework. But if you only know how to do this in java, it would even help. Maybe I can find a solution for .net more easier. I thought of things like transactions. But I only got transactions to work for consumers, not for producers. 回答1: Conventional wisdom used to suggest that if you wanted maximum throughput

JMSTemplate check if topic exists and get subscriber count

北慕城南 提交于 2019-12-24 08:58:52
问题 I have been looking for some documentation/example for checking if a dynamically created topic exist and if it does, how to get the subscriber count for the topic. I use following code for sending out message to a topic - jmsTemplate.send(destination, new MessageCreator() { @Override public Message createMessage(Session session) throws JMSException { TextMessage message = session.createTextMessage(); message.setText(commandStr); return message; } }); This code seems to create the topic and

How to connect to a network of activemq brokers from a client application?

老子叫甜甜 提交于 2019-12-24 08:48:16
问题 I have setup a network of brokers in activemq, how do i connect to that from my client application I tried with network:static:(tcp://master1.IP:61616,tcp://master2.IP:61617) and but I get the following exception javax.jms.JMSException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [network]; With static:(tcp://master1.IP:61616,tcp://master2.IP:61617)

GlusterFS as shared storage for ActiveMQ master/slave cluster

感情迁移 提交于 2019-12-24 05:37:12
问题 I want to setup an ActiveMQ cluster. As I encountered problems with shared nothing approach, I'd like to do it using shared filesystem. However, the ActiveMQ documentation warns about possible problems related to filesystem locks. As I'm not sure, I'd like to ask, if GlusterFS would be a good choice for shared filesystem. 回答1: Shared-storage master-slave requires that the underlying file system supports network file locks. GlusterFS seems to support network locks going by the documentation

GroovyConsole ActiveMQ error: NoClassDefFoundError: Could not initialize class org.apache.activemq.ActiveMQPrefetchPolicy

∥☆過路亽.° 提交于 2019-12-24 03:45:06
问题 I am trying to run a very simple ActiveMQ client script in GroovyConsole. I've included activemq-all-5.5.0.jar and slf4j-api-1.5.11.jar through the Script > Add Jar to ClassPath menu. I see org.apache.activemq.ActiveMQPrefetchPolicy in the activemq jar, yet I am getting the exception below. Here is the script: import org.apache.activemq.* import org.apache.activemq.command.* import javax.jms.* // // // def connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61616") def

How can I do a Storm spout that listen an ActiveMQ topic?

烈酒焚心 提交于 2019-12-24 03:20:49
问题 I programmed a Storm topology that listens on particular topic on kafka with its spouts. Now I have to migrate it on activeMQ. Is possible to reproduce these topics with activeMQ and create spouts that listen them as I did with kafka? I googled it, but it is not clear how I can send a message to a topic or listen a particular topic. In kafka a do something like data = new KeyedMessage<>("topic", sms); producer.send(data); to send sms on topic and just create a new kafkaspout("topic") to

How can I do a Storm spout that listen an ActiveMQ topic?

非 Y 不嫁゛ 提交于 2019-12-24 03:20:04
问题 I programmed a Storm topology that listens on particular topic on kafka with its spouts. Now I have to migrate it on activeMQ. Is possible to reproduce these topics with activeMQ and create spouts that listen them as I did with kafka? I googled it, but it is not clear how I can send a message to a topic or listen a particular topic. In kafka a do something like data = new KeyedMessage<>("topic", sms); producer.send(data); to send sms on topic and just create a new kafkaspout("topic") to

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