activemq

How to get all enqueued messages in ActiveMQ?

笑着哭i 提交于 2019-12-06 07:38:06
问题 I want to build a simple consumer program (in java) to get all messages stocked in an ActiveMQ subject. I have a producer which send TextMessage in the queue. But I don't know how to start to write my consumer for retrieving old messages and wait for new one. If you have an example, thanks! This is my Producer: http://pastebin.com/uRy9D8mY This is my Consumer: http://pastebin.com/bZh4r66e When I run my producer before my consumer, then run the consumer, I got nothing. When I run my consumer

ActiveMQ to Apollo transition, Openwire to Stomp protocol configuration

二次信任 提交于 2019-12-06 05:58:49
I'm trying to switch from ActiveMQ 5.6 to Apollo 1.5. I have two soft that are exchanging messages, using publish/subscribe on topics. The first one is c++ and use openwire with tcp The second one is Javascript and use stomp with websockets With ActiveMQ everything worked fine, and the messages I sent could be read and write on both softs, and I didn't changed the clients since. Now, I send messages from the c++ soft (using openwire), and try to read them with the JS soft, and I get errors. In fact I receive message with header content-type: "protocol/openwire", but I expect stomp. this is how

Procedure to migrate from IBM MQ to ActiveMQ [closed]

痞子三分冷 提交于 2019-12-06 04:11:04
Closed . This question needs to be more focused . It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed 3 years ago . I just need to know some basic information or the procedure that is followed when migrating from IBM MQ server to ActiveMQ. We are planning to migrate our messaging systems from IBM MQ to Active MQ. To be specific the migration is from MQ V7.0 to ActiveMQ V5.7.0. What would be the object movement from IBM MQ to ActiveMQ i.e., to know the comparison or the relation between MQ

Is it possible to mirror a single queue in ActiveMQ?

倾然丶 夕夏残阳落幕 提交于 2019-12-06 04:09:30
I'm running ActiveMQ in a production system. Some of our queues are very high volume and some are very low volume. I'm interested in mirroring one of the low volume queues so that I can build informal monitoring services around the messages being received. Unfortunately, the only documentation I've been able to find seems to imply that Mirrored Queues are are all-or-nothing: you either create a topic for every single queue you have (and suffer the performance penalty of copying every message flowing through your system), or you can't use the feature at all. Is there no way of enabling this

ActiveMQ 可以干什么?

旧街凉风 提交于 2019-12-06 03:36:17
ActiveMQ 可以干什么? 在很多场景下,ActiveMQ 和异步消息在企业级开发扮演一个重要的角色。下面举几个例子: 异构(多种编程语言)应用集成 ---ActiveMQ使用的是java语言编写的,所以提供了非常自然的java client api, 但ActiveMQ 也提供client 语言是 C / C++,Perl,PHP,NET,Python,Ruby,和一些其他的语言。这是一个巨大的优势,当你考虑如何整合不同语言在不同平台上的应用。在这种情况下在这一点上,不同的客户机接口使它可以通过发送和接收消息(跨语言通信),ActiveMQ不管使用的是什么语言。除了跨语言由ActiveMQ的能力,将这些程序的能力没有使用rpc有绝对一大好处,因为消息中间件可以解耦的应用。 作为RPC(远程过程调用)的一种替代---应用中使用RPC风格的同步调用是广泛的。考虑到绝大多数的客户端-服务器应用程序使用RPC包括自动取款机,大多数Web应用程序、信用卡系统、销售点系统,以及更多。虽然这些系统是某种意义上取得了巨大的成功,但是转换成异步消息,不放弃回应保证的情况下使用可以带来的更多的好处。依赖于同步的系统请求通常具有有限的能力,随着过程逐渐的增加,这个同步过程花费的时间会越来越久。使用异步消息,附加信息接收器可以很容易地添加,以便消息同时被消耗和因此处理得更快。当然

SpringBoot、ActiveMQ整合阿里大鱼-----短信服务

时间秒杀一切 提交于 2019-12-06 02:38:40
3. 短信微服务 3.1 需求分析 构建一个通用的短信发送服务(独立于优乐选的单独工程),接收 activeMQ 的消息( MAP 类型) 消息包括手机号( mobile )、短信模板号( template_code )、签名( sign_name )、参数字符串( param ) 3.2 代码实现 3.2.1 工程搭建 ( 1 )创建单独的一个工程 sms ( JAR 工程), POM 文件引入依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.4.0.RELEASE</version> </parent> <dependencies> <!-- springmvc --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!--消息中间件activeMq--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId

Broker Network flooded with unconsumed ActiveMQ.Advisory.TempQueue messages

六月ゝ 毕业季﹏ 提交于 2019-12-06 01:54:01
问题 I'm currently investigating a memory problem in my broker network. According to JConsole the ActiveMQ.Advisory.TempQueue is taking up 99% of the configured memory when the broker starts to block messages. A few details about the config Default config for the most part. One open stomp+nio connector, one open openwire connector. All brokers form a hypercube (one on-way connection to every other broker (easier to auto-generate)). No flow-control. Problem details The webconsole shows something

ActiveMQ Transport Thread is not terminated when main ends

我与影子孤独终老i 提交于 2019-12-06 01:32:22
This is how I start connection: factory = new PooledConnectionFactory(brokerURL); brokerURL is "failover:(tcp://host1.com:61616,tcp://host2.com:61616)?randomize=false&jms.useAsyncSend=false&jms.dispatchAsync=false&maxReconnectAttempts=30&maxReconnectDelay=3000" Connection is started: connection = factory.createConnection("", ""); connection.start(); Application performs its usual tasks before connections gets closed: connection.close(); main method is finished, but JVM is not, because there are still a few ActiveMQ threads active: Thread [ActiveMQ Transport: tcp://host1.com/ip_address:61616

Create durable topic and subscriber spring boot jms with ActiveMQ

不羁岁月 提交于 2019-12-06 01:22:07
I need to create a topic and a durable subscriber for ActiveMQ, my problem is that I don't know where to specify that. I am able to create the topic and consume the messages, but when I turn off the subscriber then keep sending messages and turn on the subscriber again, it won't read them. This is what I have so far: Sending the message : JmsTemplate jmsTemplate = context.getBean(JmsTemplate.class); jmsTemplate.setPubSubDomain(true); jmsTemplate.setDeliveryMode(DeliveryMode.PERSISTENT); jmsTemplate.setDeliveryPersistent(true); jmsTemplate.convertAndSend("venta.topic",venta); Receiving the

how to associate the activemq-core.xsd url with the activemq.xsd found in the jar file?

笑着哭i 提交于 2019-12-06 00:15:22
Somebody knows how to associate the activemq-core.xsd url with the activemq.xsd found in the jar file (activemq-core-5.2.0.jar)? I dig some solution in internet but didn't work. I'm getting this error: Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 19 in XML document from class path resource [jms-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'amq:broker'. at org.springframework.beans.factory.xml.XmlBeanDefinitionReader