activemq

Is it possible to get a list of queues on a remote broker?

自古美人都是妖i 提交于 2019-12-01 04:30:54
I'm trying to figure out how to get a list of existing queues on a remote broker. It looks like I can listen to queues as they are created/destroyed by adding an advisory message (which I don't yet have working) but I need to get all EXISTING queues on startup. It looks like I can do this with getDestinationMap: http://activemq.apache.org/maven/apidocs/org/apache/activemq/broker/region/Region.html#getDestinationMap() But that seems like it can only be called from an embedded and in-process broker. I mean... I'm willing to go that route but it seems to make more sense to just have the normal

ID07 kafka & ActiveMQ

て烟熏妆下的殇ゞ 提交于 2019-12-01 04:18:26
Kafka是分布式发布-订阅消息系统。它最初由LinkedIn公司开发,之后成为Apache项目的一部分。Kafka是一个分布式的,可划分的,冗余备份的持久性的日志服务。它主要用于处理活跃的流式数据。 Kafka主要特点: 同时为发布和订阅提供高吞吐量。据了解,Kafka每秒可以生产约25万消息(50 MB),每秒处理55万消息(110 MB)。 可进行持久化操作。将消息持久化到磁盘,因此可用于批量消费,例如ETL,以及实时应用程序。通过将数据持久化到硬盘以及replication防止数据丢失。 分布式系统,易于向外扩展。所有的producer、broker和consumer都会有多个,均为分布式的。无需停机即可扩展机器。 消息被处理的状态是在consumer端维护,而不是由server端维护。当失败时能自动平衡。 支持online和offline的场景。 Kafka的架构: Kafka的整体架构非常简单,是显式分布式架构,producer、broker(kafka)和consumer都可以有多个。Producer,consumer实现Kafka注册的接口,数据从producer发送到broker,broker承担一个中间缓存和分发的作用。broker分发注册到系统中的consumer。broker的作用类似于缓存,即活跃的数据和离线处理系统之间的缓存。客户端和服务器端的通信

Is it possible to get a list of queues on a remote broker?

孤街醉人 提交于 2019-12-01 02:37:43
问题 I'm trying to figure out how to get a list of existing queues on a remote broker. It looks like I can listen to queues as they are created/destroyed by adding an advisory message (which I don't yet have working) but I need to get all EXISTING queues on startup. It looks like I can do this with getDestinationMap: http://activemq.apache.org/maven/apidocs/org/apache/activemq/broker/region/Region.html#getDestinationMap() But that seems like it can only be called from an embedded and in-process

ActiveMQ持久化到MySQL以及使用SSL协议通讯

烂漫一生 提交于 2019-12-01 02:20:02
最近公司事情稍微少了点,研究下怎么优化几个系统的交互,因为我们目前使用的是长链接的同步接口,就考虑用下MQ来处理下。 由于公司对安全有要求且和CA业务有关,则使用了SSL协议。此文使用的是Activemq的SSL协议+MYSQL作为持久化数据库,后续可能使用NIO+SSL协议。 其他实现了JMS的MQ应该也大同小异。 此文大多是参考官网文档 持久化: http://activemq.apache.org/persistence.html 相关协议: http://activemq.apache.org/configuring-transports.html 先说说我对activemq的理解,由于是用java语言开发的,给我的感觉是依赖spring并且跑在jetty上的一个java程序。有了个大概的概念里面配置的东西就更好理解。 配置mysql持久化,默认持久化是使用的kahadb写入文件里,这里修改成jdbc方式连接mysql,既然是jdbc就需要一个数据库驱动的jar包, 所以我们需要在lib文件夹下放入mysql-connector-java-5.1.34-bin.jar(其他版本一样),因为使用的是官网推荐的dbcp数据源,相关其他的依赖包在lib下面已经有了。 想要使用其他的数据源则需要引入相关依赖的jar包即可。 以下是activemq.xml的mysql持久化配置。

Dynamic scaling of JMS consumer in spring boot

十年热恋 提交于 2019-12-01 01:55:31
I am trying to build a spring-boot application which will read data from a activeMQ producer. I want to resources available on customer to the optimum.In my spring-boot application, I want to configure multiple consumers and all these consumer will connect to a single queue. Is their a way I can dynamically scale up and scale down the consumers on sprint-boot application? the consumers your are talking about, are different thread of the DefaultMessageListenerContainer or different instances of DefaultMessageListenerContainer ? you can increase and decrease dynamically threads number of

AMQP 0-9-1 vs 1-0

你说的曾经没有我的故事 提交于 2019-12-01 00:59:16
问题 I am looking for a messaging service for a new project that will have to interface some C# applications with some Java applications. I really like RabbitMQ because it seems to have amazing support for both technologies. I see in the RabbitMQ specs that at the moment only AMQP 0-9-1 model is provided. Is that a show stopper? Should I maybe address to ActiveMQ which provides AMQP 1.0? Thanks for your advice 回答1: Your question is perfectly addressed in the official protocol overview: AMQP 1.0

SpringBoot对消息队列(MQ)的支持

人走茶凉 提交于 2019-11-30 21:51:18
1.异步消息的定义   异步消息的主要目的是为了系统与系统之间的通信,所谓异步消息即消息发送者无需等待消息接收者的处理以及返回,甚至无需关心消息是否发送成功   在异步消息中有两个很重要的概念,即消息代理和目的地,当消息发送者发送消息之后,消息将由消息代理接管,消息代理保证消息传递到指定目的地。   异步消息主要有两种目的地形式,队列(queue)和主题(topic),队列用于点对点形式的消息通信,主题用于发布订阅式的消息通信。 1.1目的地形式分类 1.1.1点对点式   当消息发送者发送消息,消息代理将消息后将消息放进一个队列里,当有消息接收者来接收消息的时候,消息将从队列中取出传递给消息接收者,这时候队列里就没有了这条消息。点对点式确保每一条消息只有唯一的发送者和接收者,但这并不能说明只有一个接收者能够从队列中接收消息,因为队列中有多个消息,点对点式只保证每一条消息只有唯一的发送者和接收者 1.1.2发布/订阅式   发布订阅式是消息发送者发送消息到主题,而多个消息接收者监听这个主题,此时的消息发送者和接收者分别叫做发布者和订阅者 1.2 企业级消息代理   JMS即JAVA消息服务,是基于JVM的消息代理规范,ActiveMQ是一个JMS的实现 AMQP也是一个消息代理的规范,他不仅兼容JMS,还支持跨语言和平台,AMQP的主要实现是RabbitMQ 1.3

Spring Boot 入门之消息中间件篇(五)

久未见 提交于 2019-11-30 21:37:33
一、前言 在消息中间件中有 2 个重要的概念:消息代理和目的地。当消息发送者发送消息后,消息就被消息代理接管,消息代理保证消息传递到指定目的地。 我们常用的消息代理有 JMS 和 AMQP 规范。对应地,它们常见的实现分别是 ActiveMQ 和 RabbitMQ。 上篇文章 《Spring Boot 入门之缓存和 NoSQL 篇(四)》 。 二、整合 ActiveMQ 2.1 添加依赖 1 2 3 4 5 6 7 8 9 10 < dependency > < groupId > org.springframework.boot </ groupId > < artifactId > spring-boot-starter-activemq </ artifactId > </ dependency > <!-- 如果需要配置连接池,添加如下依赖 --> < dependency > < groupId > org.apache.activemq </ groupId > < artifactId > activemq-pool </ artifactId > </ dependency > 2.2 添加配置 1 2 3 4 5 6 7 8 # activemq 配置 spring.activemq.broker-url=tcp://192.168.2.12:61616

ActiveMQ的环境搭建及使用

ぐ巨炮叔叔 提交于 2019-11-30 21:35:47
一:环境搭建 首先需要下载ActiveMQ的开发包: 解压之后,目录结构如下所示: 运行bin目录下的 activemq.bat 命令,启动ActiveMQ服务。 然后:http://127.0.0.1:8161/admin/ 验证服务启动情况,用户名/密码 admin/admin。界面如下: 二:ActiveMQ使用 引入上面解压包中的 activemq-all-5.11.1.jar 1. ActiveMQ 点对点消息实现 1.1 直接receive方式 消息生产者: import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; /** * 消息生产者 * @author Administrator * */

ActiveMQ delete queue from java

一个人想着一个人 提交于 2019-11-30 21:33:36
How could I delete a queue in activemq from java program? Is there anything like session.delelteQueue()? Thanks M. Simple solution that does not use JMX it to cast connection to ActiveMQConnection and use its destroyDestination() method. Simple utility that uses that approach: import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.command.ActiveMQQueue; import javax.jms.JMSException; /** * simple class to delete a queue form the activeMQ broker * @author josef. */ public class QueueDeleter { public static void main(String