activemq

StompClientLib - unsubscribe socketclient

て烟熏妆下的殇ゞ 提交于 2019-12-04 16:34:53
I've added StompClientLib in my project and I'm facing problem while unsubscribing a destination topic. Unsubscription of destination gives following error: "org.apache.activemq.transport.stomp.ProtocolException: No subscription matched.\r\tat org.apache.activemq.transport.stomp.ProtocolConverter.onStompUnsubscribe(ProtocolConverter.java:734)\r\tat org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:262)\r\tat org.apache.activemq.transport.ws.AbstractStompSocket.processStompFrame(AbstractStompSocket.java:151)\r\tat org.apache.activemq.transport.ws.jetty9

ActiveMQ: starting consumer without broker

旧街凉风 提交于 2019-12-04 14:42:09
I am writing a JMS client that consumes from a Queue. My broker is activemq, if it matters. One requirement is that the client should start even if the broker is down. In that case it should behave as if there where no messages in the Queue, and once the broker is up and messages start coming behave accordingly. The problem is that in my code: connectionFactory = new ActiveMQConnectionFactory(url); Connection connection = connectionFactory.createConnection(); connection.start() If the broker is down, then it gets stuck in connection.start() . While what I would like to have is connection.start

ActiveMQ学习笔记

这一生的挚爱 提交于 2019-12-04 13:41:28
JMS即 Java消息服务 (Java Message Service)应用程序接口,是一个 Java平台 中关于面向 消息中间件 (MOM)的 API ,用于在两个应用程序之间, 或 分布式系统 中发送消息,进行异步通信。Java消息服务是一个与具体平台无关的API,绝大多数MOM提供商都对JMS提供支持。 Apache ActiveMQ 是 Apache软件基金会 所研发的开放源代码 消息中间件 ;由于ActiveMQ是一个纯 Java 程序,因此只需要 操作系统 支持 Java虚拟机 ,ActiveMQ便可执行。 下载Apache ActiveMQ服务 下载后将zip 压缩包解压,将这个解压缩后的文件夹拷贝到指定位置,我本人的服务都在c盘下的service文件夹 找到C:\service\apache-activemq\bin\win64下的activemq.bat文件双击即可启动activemq服务器,如下图 说明已经启动完毕,可以登录主页面查看ActiveMQ的相关内容, 如果对话框一闪而过则需要配置环境变量 打开网页,在地址栏输入 http://127.0.0.1:8161 用户名,密码都是admin 来源: https://www.cnblogs.com/firefuck/p/11868605.html

ActiveMQ send ObjectMessage

时光怂恿深爱的人放手 提交于 2019-12-04 13:29:58
问题 I'm using ActiveMQ to implement a messaging system in my current project. I need to send and receive Java objects instead of simple text or binary messages. The Java object (my message object) implements the Serializable interface as required. Recent versions of ActiveMQ added some security and I need to set a property with the allowed packages as described here, but I haven't managed to make it work. I'm not sure where that property needs to be added. Error message: This class is not allowed

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 - STOMP+SSL with Python STOMP client

冷暖自知 提交于 2019-12-04 12:11:01
Can anyone explain me how to add SSL to the Python STOMP client I'm using. I added the stomp+ssl transport connector in the ActiveMQ configuration file and my basic Python STOMP client is below: import time import sys import stomp class MyListener(stomp.ConnectionListener): def on_error(self, headers, message): print('received an error "%s"' % message) def on_message(self, headers, message): print('received a message "%s"' % message) conn = stomp.Connection() conn.set_listener('', MyListener()) conn.start() conn.connect('admin', 'password', wait=True) conn.subscribe(destination='/queue/test',

How to configure ActiveMQ JCA connector in JBoss to use XA connections?

主宰稳场 提交于 2019-12-04 10:52:39
问题 On JBoss 5.1.0 I have Datasource (PostgreSQL 8.3.11) configured using *-ds.xml (standard jboss DS). It uses XADataSource (PGXADataSource). I also have ActiveMQ broker (right now it runs as in-VM, under JBoss, but it will be on separate server latter). What I want to do is to make ActiveMQ Connection Factory and Datasource to participate in XA Transactions. For example, I want to update DB record and send a JMS message as a UOW. You get the idea. I configured PGXADataSource in my-pg-ds.xml and

Signal a rollback from a JMS MessageListener

早过忘川 提交于 2019-12-04 09:11:37
问题 I've been working with JMS and ActiveMQ. Everything is working wonders. I am not using spring, nor can I. The interface javax.jms.MessageListener has only one method, onMessage . From within a implementation, there is a chance an exception will be thrown. If in fact an exception gets thrown, then I say the message wasn't properly processed and needs to be re-tried. So, I need ActiveMQ to wait for a little while and then, retry. i.e. I need the thrown exception to rollback the JMS transaction.

activeMq学习

谁说胖子不能爱 提交于 2019-12-04 08:06:33
1. 下载    http://activemq.apache.org/components/classic/download/   版本 windows: apache-activemq-5.15.10-bin.zip 2. 安装   解压 ...   启动:D:\activemq\apache-activemq-5.15.10\bin\win64\ 点击activemq.bat 3.验证:   浏览器输入: http://localhost:8161/   默认用户名和密码:  admin:admin      来源: https://www.cnblogs.com/zchok/p/11847285.html

ActiveMQ 消息服务(一)

試著忘記壹切 提交于 2019-12-04 07:26:54
1、百度百科对ActiveMQ的解释: ActiveMQ 是Apache出品,最流行的,能力强劲的开源消息总线。ActiveMQ 是一个完全支持JMS1.1和J2EE 1.4规范的 JMS Provider实现,尽管JMS规范出台已经是很久的事情了,但是JMS在当今的J2EE应用中间仍然扮演着特殊的地位。 由于ActiveMQ是一个独立的jms provider,所以我们不需要其他任何第三方服务器就可以马上做我们的测试了.编译example目录下面的程序 ProducerTool/ConsumerTool 是JMS参考里面提到的典型应用,Producer产生消息,Consumer消费消息,而且这个例子还可以加入参数帮助你测试刚才启动的本地 ActiveMQ或者是远程的ActiveMQ 2、官方网站下载路径 : http://activemq.apache.org/download.html 下载后解压,得到的目录结构为: 进入 bin 文件夹下,点击 activemq.bat,会看到: 说明启动服务器成功!在浏览器输入“http://localhost:8161/admin/”进入到登陆页面,默认用户名/密码都是admin。 其中在导航菜单中,Queues是队列方式消息。Topics是主题方式消息。Subscribers消息订阅监控查询。Connections可以查看 链接数