activemq

ActiveMQ 基础

╄→尐↘猪︶ㄣ 提交于 2019-11-28 10:45:56
Apache ActiveMQ 是Apache软件基金会所研发的开放源代码消息中间件;由于ActiveMQ是一个纯Java程序,因此只需要操作系统支持Java虚拟机,ActiveMQ便可执行。它能很好地支持J2EE提出的JMS(Java Message Service,即Java消息服务)规范。 来源: https://www.cnblogs.com/loveer/p/11405546.html

ActiveMQ+ZooKeeper 集群整合

断了今生、忘了曾经 提交于 2019-11-28 09:42:27
原理简介: 一般在部署ActiveMQ集群的时候,更倾向于使用基于ZooKeeper的 Replicated LevelDB Store方式 ,该方式是 Master Slave部署方案 的其中一种策略,也是在多台主机实现ActiveMQ集群的主流部署方式。 此教程 只保证了高可用性 。要想保证负载均衡得再结合Broker Clusters 部署方案,配置网络连接器。 工作流程: 在ZooKeeper中管理多个Broker节点,根据 Master选举策略让其中一个 Broker选举为Master(只有Master才具备对外提供服务的能力),剩下Broker为slave。 编码时,client端(消费者)通过failover协议来连接ActiveMQ集群。 一、服务器配置 1. ZooKeeper集群 ZooKeeper集群保证ZooKeeper本身的高可用性。 1.1 修改ZK配置文件 conf/zoo.cfg 主机IP 服务端口(默认) 集群通信端口 节点目录/opt/下 192.168.100.142 2181 2888:3888 zookeeper 192.168.100.143 2181 2888:3888 zookeeper 192.168.100.144 2181 2888:3888 zookeeper 集群通信端口:第一个端口是master和slave之间的通信端口

ActiveMQ+ZooKeeper 伪集群整合

╄→гoц情女王★ 提交于 2019-11-28 09:42:10
原理简介: 一般在部署ActiveMQ集群的时候,更倾向于使用基于ZooKeeper的Replicated LevelDB Store方式,该方式是Master Slave部署方案的其中一种策略,也是在多台主机实现ActiveMQ集群的主流部署方式。 此教程只保证了高可用性。要想保证负载均衡得再结合Broker Clusters 部署方案,配置网络连接器。 工作流程: 在ZooKeeper中管理多个Broker节点,根据 Master选举策略让其中一个 Broker选举为Master(只有Master才具备对外提供服务的能力),剩下Broker为slave。 编码时,client端(消费者)通过failover协议来连接ActiveMQ集群。 一、服务端配置 1. ZooKeeper伪集群配置 -- 服务端口 集群通信端口 节点目录/opt/下 zk1 2181 2887:3887 /zookeeper/zk1 zk2 2182 2888:3888 /zookeeper/zk2 zk3 2183 2889:3889 /zookeeper/zk3 集群通信端口:第一个端口是master和slave之间的通信端口,默认是2888;第二个端口是leader选举的端口,集群刚启动的时候选举或者leader挂掉之后进行新的选举的端口默认是3888。 在/opt

How can I deploy a resource-adapter activation in JBoss 7?

不想你离开。 提交于 2019-11-28 09:41:54
问题 I am trying to figure out how to deploy a resource-adapter activation in JBoss 7. Basically, I want to be able to package and deploy a full application without having to modify the base server configuration, in part because I want to bootstrap testing using Arquillian but also because I want to be able to deploy my packages into an environments where I may not have the option of modifying the base server's configuration. Here's where I am right now. I have created an EAR which contains the

ActiveMQ基础使用

风流意气都作罢 提交于 2019-11-28 05:33:44
概述 ActiveMQ是由Apache出品的,一款最流行的,能力强劲的开源消息总线。ActiveMQ是一个完全支持JMS1.1和J2EE 1.4规范的 JMS Provider实现,它非常快速,支持多种语言的客户端和协议,而且可以非常容易的嵌入到企业的应用环境中,并有许多高级功能。 特性 遵循JMS规范:ActiveMQ的各种特性是JMS1.1规范的实现。它们包括同步和异步消息传递,一次和只有一次的消息传递,对于预订者的持久消息等等。依附于JMS规范意味着,不论JMS消息提供者是谁,同样的基本特性都是有效的。(JMS可查看前篇博文(ActiveMQ基础教程(一)JMS概述 https://www.jianshu.com/p/639627f88a6e )。 连接:ActiveMQ提供各种连接选择,包括HTTP,HTTPS,IP多点传送,SSL,STOMP,TCP,UDP,XMPP等。大量的连接协议支持使之具有更好的灵活性。 支持多种语言客户端:ActiveMQ对多种语言提供客户端API,除了Java之外还有C/C++、.NET、Perl、PHP、Ruby、Python等。这使得ActiveMQ能用在Java之外的其它语言中。很多其它语言都可以通过ActiveMQ提供的客户端API使用ActiveMQ的全部特性。当然,ActiveMQ代理器(broker)仍然是运行在java虚拟机上

MQ之ActiveMQ

喜你入骨 提交于 2019-11-28 05:07:55
一、前言部分 1.MQ的产品种类 二、入门概述 1.为什么引入MQ 2..MQ的作用定义 3.ActiveMQ官网介绍和下载 二、ActiveMQ安装和控制台 1.官网下载 2.Linux的安装 a.普通启动 b.普通关闭 c.带日志的启动方式 3.ActiveMQ控制台访问 三、Java编码实现ActiveMQ通讯 1.POM文件 2.JMS编码总体架构 3.队列 a.消息生产者编码 b.消息消费者编码 c.总结 a.JMS的基本开发步骤 b.两种消费方式 4.topic 5.队列和topic对比 四、JMS规范和落地产品 1.是什么 a.JavaEE是什么 b.JMS 2.MQ中间件的其他落地产品 3.JMS的组成结构和特点——四大元素 a.消息头 b.消息体 c.消息属性 4.JMS的可靠性 (1)持久性 (2)事务 (3)签收 5.JMS的点对点总结 6.JMS的发布订阅总结 五.ActiveMQ的Broker 1.是什么 六、Spring整合ActiveMQ 1.pom文件 2.Spring配置文件 3.队列 4.主题 5.在Spring里面实现消费者不启动,直接通过配置监听完成 七.SpringBoot整合ActiveMQ 1.队列 2.主题 两个主题消费者都同时消费生产者消息 八、ActiveMQ的传输协议 1.是什么 2.有哪些 a.tcp协议 b.NIO协议 3

Sending a JMS Message from Oracle Database on DML Event

只愿长相守 提交于 2019-11-28 05:06:22
问题 I'm trying to determine if it is possible to configure Oracle Database 11g to send a JMS message to a broker (ActiveMQ in my case) when a particular DML event (say an insert or update to a particular table) occurs so that I can process this event in an external, non-Oracle application. I've done some searching and it seems like Oracle Streams is capable of this use case since it alludes to JMS, but the documentation seems to focus only on Oracle Database to Oracle Database JMS message sending

消息中间件_ActiveMQ_Linux下安装

和自甴很熟 提交于 2019-11-28 03:17:45
一、下载与上传 1.1、下载地址: http://activemq.apache.org/download.html 1.2、FTP上传至服务器 二、解压启动 root@localhost /data/software #tar -zxvf apache-activemq-5.15.9-bin.tar.gz root@localhost /data/software/apache-activemq-5.15.9/bin #./activemq start 查看端口情况: root@localhost /data/software/apache-activemq-5.15.9/bin #netstat -anp|grep 61616 三、开启防火墙端口 1、如果使用了云服务器需要先开启8161(web管理页面端口)、61616(activemq服务监控端口) 两个端口 2、打开linux防火墙端口 /sbin/iptables -I INPUT -p tcp --dport 8161 -j ACCEPT&&/etc/init.d/iptables save&&service iptables restart&&/etc/init.d/iptables status /sbin/iptables -I INPUT -p tcp --dport 61616 -j ACCEPT&&/etc

消息中间件_ActiveMQ消息类型

佐手、 提交于 2019-11-28 03:10:28
Activemq消息类型JMS规范中的消息类型包括TextMessage、MapMessage、ObjectMessage、BytesMessage、和StreamMessage等五种。ActiveMQ也有对应的实现,下面我们结合Spring JMS分别来看一下五种消息类型的收发代码。1、TextMessage /** * 向指定Destination发送text消息 * @param destination * @param message */ public void sendTxtMessage(Destination destination, final String message){ if(null == destination){ destination = jmsTemplate.getDefaultDestination(); } jmsTemplate.send(destination, new MessageCreator() { public Message createMessage(Session session) throws JMSException { return session.createTextMessage(message); } }); System.out.println("springJMS send text message...

Any simple way to get the queue length of an ActiveMQ? [closed]

浪尽此生 提交于 2019-11-28 03:07:28
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . How to obtain the queue length (number of unconsumed messages sent to queue) in ActiveMQ, using Java? 回答1: You have to use JMX, since the Queue interface does not provide such information. Example of retrieving