activemq

ActiveMQ-inAction-Broker-学习笔记

自闭症网瘾萝莉.ら 提交于 2019-11-30 08:53:22
Running Broker(运行 broker) ActiveMQ5.0 的二进制发布包中bin 目录中包含一个名为activemq 的脚本, 直接运行这个脚本就可以启动一个broker。 此外也可以通过一下对其进行配置: Broker Configuration URI Broker XBean URI 对broker 以下是一些命令行参数的例子: Embedded(嵌入的) Broker 可以通过在应用程序中 以编码的方式启动broker ,例如: Java 代码 BrokerService broker = new BrokerService(); broker.addConnector("tcp://localhost:61616"); broker.start(); 启动多个broker,那么需要为broker 设置一个名字。例如: Java 代码 BrokerService broker = new BrokerService(); broker.setName("fred"); broker.addConnector("tcp://localhost:61616"); broker.start(); 如果希望在同一个JVM 内访问这个broker, 那么可以使用VM Transport, URI是:vm://brokerName。 可以通过BrokerFactory

How to monitor Apache Artemis

∥☆過路亽.° 提交于 2019-11-30 07:45:00
I'm doing some testing with RabbitMQ, ActiveMQ and Apache Artemis in a Windows .NET environment. RabbitMQ and ActiveMQ ship with a web interface where you can see information about your broker, queues, messages etc. but Artemis does not. I really want to be able to monitor my Artemis broker in a web interface or at the very least with some cmd/PowerShell commands. I've read on this page about some third-party tools that can be used to monitor an ActiveMQ instance and I assumed that it also applied to Artemis. Unfortunately, I have not been able to get these third-party tools to work. Some of

ActiveMQ的介绍及使用

故事扮演 提交于 2019-11-30 06:32:48
一、消息中间件概述 什么是消息中间件 发送者将消息发送给消息服务器,消息服务器将消感存放在若千队列中,在合适的时候再将消息转发给接收者。 这种模式下,发送和接收是异步的,发送者无需等待; 二者的生命周期未必相同: 发送消息的时候接收者不一定运行,接收消息的时候发送者也不一定运行;一对多通信: 对于一个消息可以有多个接收者。 二、JMS的介绍 2.1什么是JMS? JMS是java的消息服务,JMS的客户端之间可以通过JMS服务进行异步的消息传输。 2.2消息模型 P2P (点对点): 1.P2P模式图 里面涉及到的概念以及其中的特点 1.消息队列(Queue) 2.发送者(Sender) 3.接收者(Receiver) 4.每个消息都被发送到一个特定的队列,接收者从队列中获取消息。队列保留着消息,直到他们被消费或超时。 特点: 1.每个消息只有一个消费者(Consumer)(即一旦被消费,消息就不再在消息队列中) 2.发送者和接收者之间在时间上没有依赖性,也就是说当发送者发送了消息之后,不管接收者有没有正在运行,它不会影响到消息被发送到队列 3.接收者在成功接收消息之后需向队列应答成功 Pub/Sub (发布与订阅) Pub/Sub模式图 里面涉及到的概念以及特点 1.主题(Topic) 2.发布者(Publisher) 3.订阅者(Subscriber) 客户端将消息发送到主题

SpringBoot整合ActiveMQ

橙三吉。 提交于 2019-11-30 06:32:39
目录结构 引入 maven依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.4.RELEASE</version> <relativePath/> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot

SpringBoot 操作ActiveMQ

强颜欢笑 提交于 2019-11-30 06:09:10
一、消息队列中间件介绍 消息队列中间件是分布式系统中重要的组件,主要解决 应用耦合、异步消息、流量削锋 等问题,实现高性能、高可用、可伸缩和最终一致性架构,是大型分布式系统不可缺少的中间件。 目前在生产环境中使用较多的消息队列有 ActiveMQ、RabbitMQ、ZeroMQ、Kafka、MetaMQ、RocketMQ 等。 特性 异步性:将耗时的同步操作通过以发送消息的方式进行了异步化处理,减少了同步等待的时间。 松耦合:消息队列减少了服务之间的耦合性,不同的服务可以通过消息队列进行通信,而不用关心彼此的实现细节,只要定义好消息的格式就行。 分布式:通过对消费者的横向扩展,降低了消息队列阻塞的风险,以及单个消费者产生单点故障的可能性(当然消息队列本身也可以做成分布式集群)。 可靠性:消息队列一般会把接收到的消息存储到本地硬盘上(当消息被处理完之后,存储信息根据不同的消息队列实现,有可能将其删除),这样即使应用挂掉或者消息队列本身挂掉,消息也能够重新加载。 JMS 规范 JMS 即 Java 消息服务(Java Message Service)应用程序接口,是一个 Java 平台中关于面向消息中间件(MOM)的 API,用于在两个应用程序之间,或分布式系统中发送消息,进行异步通信。Java 消息服务是一个与具体平台无关的 API,绝大多数 MOM 提供商都对 JMS 提供支持。

常用消息中间件

☆樱花仙子☆ 提交于 2019-11-30 06:07:13
Kafka、RabbitMQ、ZeroMQ、RocketMQ、ActiveMQ 17 个方面综合对比作为消息队列使用时的差异。 一 资料文档 Kafka:中。有kafka作者自己写的书,网上资料也有一些。rabbitmq:多。有一些不错的书,网上资料多。zeromq:少。没有专门写zeromq的书,网上的资料多是一些代码的实现和简单介绍。rocketmq:少。没有专门写rocketmq的书,网上的资料良莠不齐,官方文档很简洁,但是对技术细节没有过多的描述。activemq:多。没有专门写activemq的书,网上资料多。 二 开发语言 Kafka:Scala rabbitmq:Erlang zeromq:c rocketmq:java activemq:java 三 支持的协议 Kafka:自己定义的一套…(基于TCP) rabbitmq:AMQP zeromq:TCP、UDP rocketmq:自己定义的一套… activemq:OpenWire、STOMP、REST、XMPP、AMQP 四 消息存储 Kafka:内存、磁盘、数据库。支持大量堆积。 kafka的最小存储单元是分区,一个topic包含多个分区,kafka创建主题时,这些分区会被分配在多个服务器上,通常一个broker一台服务器。分区首领会均匀地分布在不同的服务器上,分区副本也会均匀的分布在不同的服务器上

Wildfly-Swarm and connection to external activemq via resource adapter: WFLYCTL0412

时间秒杀一切 提交于 2019-11-30 04:55:12
问题 So I've already spent considerable time on this, but now have come to a point where I'm completely at my wits end... The requirement: I'm trying to connect a wildfly 10.1.0 based message driven bean to an external activemq 5.15.0 server (the 'old' activemq, not artemis mq!). For this I'm deploying the resource adapter and tweaking the configuration. In standard deployment of wildfly this works ok. I'm using the following script to setup the container: # Disable the artemis messaging

configure JMX for ActiveMQ for remoting access

五迷三道 提交于 2019-11-30 03:57:25
Anyone can give the detailed steps on how to enable JMX (can be access remotely) on a newly installed 5.5.0 version? whaley In your activemq.xml file, you need make sure useJmx is true on your broker element: <broker xmlns="http://activemq.org/config/1.0" brokerName="localhost" useJmx="true"> and ensure that you have a management context <managementContext> <managementContext createConnector="true" connectorPort="1099"/> </managementContext> From there it is just a matter of making sure you can connect over TCP to your broker on port 1099 or whatever port you specify. This doesn't work quite

浅谈消息队列及常见的消息中间件

家住魔仙堡 提交于 2019-11-30 00:35:15
目录 前言 正文 消息队列概述 消息队列的特点 2.1. 采用异步处理模式 2.2. 应用系统之间解耦合 消息队列的传递服务模型 消息队列的的传输模式 4.1. 点对点模型 4.2. 发布/订阅模型(Pub/Sub) 消息队列应用场景 5.1. 异步处理 5.2. 系统解耦 5.3. 最终一致性 5.4. 广播 5.5. 流量削峰和流控 5.6. 日志处理 5.7. 消息通讯 消息队列的推拉模型 6.1. Push推消息模型 6.2. Pull拉消息模型 6.3. 两种类型的区别 消息队列技术对比 7.1. ActiveMQ 7.2. RabbitMQ 7.3. RocketMQ 7.4. Kafka 7.5. 几种消息队列对比 小结 前言 消息队列 已经逐渐成为企业应用系统 内部通信 的核心手段。它具有 低耦合 、 可靠投递 、 广播 、 流量控制 、 最终一致性 等一系列功能。 当前使用较多的 消息队列 有 RabbitMQ 、 RocketMQ 、 ActiveMQ 、 Kafka 、 ZeroMQ 、 MetaMQ 等,而部分 数据库 如 Redis 、 MySQL 以及 phxsql 也可实现消息队列的功能。 正文 1. 消息队列概述 消息队列 是指利用 高效可靠 的 消息传递机制 进行与平台无关的 数据交流 ,并基于 数据通信 来进行分布式系统的集成。 通过提供

通过spring开发ActiveMQ简单应用

隐身守侯 提交于 2019-11-29 22:43:13
使用spring的支持类开发JMS程序可以简化代码,确保开发质量。以下是使用ActiveMQ作为JMS实现的示例。 首先需要确保如下类库,这里使用maven的pom: <!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> < dependency > < groupId > org.springframework </ groupId > < artifactId > spring - jms </ artifactId > < version > 2.5 . 6 </ version > </ dependency > < dependency > < groupId > org.apache.xbean </ groupId > < artifactId > xbean - spring </ artifactId > < version > 3.5 </ version > </ dependency > < dependency > < groupId > org.apache.activemq </ groupId > < artifactId > activemq - core </ artifactId > <