activemq

Spring集成ActiveMQ配置 --转

萝らか妹 提交于 2020-01-19 11:29:01
转自:http://suhuanzheng7784877.iteye.com/blog/969865 集成环境 Spring采用2.5.6版本,ActiveMQ使用的是5.4.2,从apache站点可以下载。本文是将Spring集成ActiveMQ来发送和接收JMS消息。 集成步骤 将下载的ActiveMQ解压缩后文件夹如下 activemq-all-5.4.2.jar是activemq的所有的类jar包。lib下面是模块分解后的jar包。将lib下面的 Java代码 /lib/activation-1.1.jar /lib/activemq-camel-5.4.2.jar /lib/activemq-console-5.4.2.jar /lib/activemq-core-5.4.2.jar /lib/activemq-jaas-5.4.2.jar /lib/activemq-pool-5.4.2.jar /lib/activemq-protobuf-1.1.jar /lib/activemq-spring-5.4.2.jar /lib/activemq-web-5.4.2.jar 文件全部拷贝到项目中。 而Spring项目所需要的jar包如下 Java代码 /lib/spring-beans-2.5.6.jar /lib/spring-context-2.5.6.jar

ActiveMQ学习笔记(6)----ActiveMQ整合Spring开发

爱⌒轻易说出口 提交于 2020-01-19 11:17:50
1. 添加依赖   spring 提供了对JMS的支持,需要添加Spring支持jms的包和Spring的核心包,如下: <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-all</artifactId> <version>5.15.5</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>5.1.2.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> <version>5.1.2.RELEASE</version> </dependency> <!--ActiveMQ 的pool的包--> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-pool</artifactId> <version>5.15.6<

activemq安装

白昼怎懂夜的黑 提交于 2020-01-18 11:20:29
tar xf apache-activemq-5.9.1-bin.tar.gz cd apache-activemq-5.9.1 ActiveMQ 需要用到两个端口 一个是消息通讯的端口(默认为 61616) 一个是管理控制台端口(默认为 8161) 可在 conf/jetty.xml 中修改, 如下: <bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start"> <!-- the default port number for the web console --> <property name="port" value="8161"/> </bean> 启动:bin/activemq start web界面查看:192.168.0.103:8161 默认用户名和密码为: admin/admin 安全配置 ActiveMQ 如果不加入安全机制的话,任何人只要知道消息服务的具体地址(包括 ip,端口,消息地址 [ 队列或者主题地址] , ) , 都可以肆无忌惮的 发送、 接收消息。 我们以简单授权配置为例: 在 conf/activemq.xml 文件中在 broker 标签最后加入以下内容即可: <plugins>

200117124600

我是研究僧i 提交于 2020-01-17 15:26:44
package com.personal.test; import org.apache.activemq.ActiveMQConnectionFactory; import javax.jms.Connection; import javax.jms.JMSException; import javax.jms.MessageProducer; import javax.jms.Queue; import javax.jms.Session; import javax.jms.TextMessage; public class JmsProduct0 { public final static String ACTIVEMQ_URL = "tcp://111.230.116.197:61616"; public final static String ACTIVEMQ_QUEUE = "QUEUE01"; public static void main(String[] args) throws JMSException { // 1. 创建链接工厂 ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory(ACTIVEMQ_URL);

ActiveMQ package for R

旧时模样 提交于 2020-01-17 04:57:05
问题 I'm trying to have a model I've built in R sent messages to an activeMQ queue. A quick googling of R points me to Rjms; however, when I check for the package on CRAN, I get an error saying "Package ‘Rjms’ was removed from the CRAN repository." Further googling just pushes me back to Rjms . Given this, is there an ActiveMQ package available in the R language? 回答1: You can install the current version from Github. First, you need to install the dependency Rjmsjars . library(devtools) install

ActiveMQ package for R

旧城冷巷雨未停 提交于 2020-01-17 04:56:13
问题 I'm trying to have a model I've built in R sent messages to an activeMQ queue. A quick googling of R points me to Rjms; however, when I check for the package on CRAN, I get an error saying "Package ‘Rjms’ was removed from the CRAN repository." Further googling just pushes me back to Rjms . Given this, is there an ActiveMQ package available in the R language? 回答1: You can install the current version from Github. First, you need to install the dependency Rjmsjars . library(devtools) install

How to disable security in activemq apollo

余生长醉 提交于 2020-01-17 03:22:07
问题 I have installed apollo 1.7.1 and using a broker with default setting. When I try to connect to this broker, got this error message. Authentication failed. Credentials=[] By default it comes with file based authentication setup. How can I disable this authentication? 来源: https://stackoverflow.com/questions/35133734/how-to-disable-security-in-activemq-apollo

ActiveMQ使用示例之Queue

扶醉桌前 提交于 2020-01-17 00:57:34
我们使用ActiveMQ为大家实现一种点对点的消息模型。 开发时候,要将apache-activemq-5.12.0-bin.zip解压缩后里面的activemq-all-5.12.0.jar包加入到classpath下面,这个包包含了所有jms接口api的实现。 maven依赖 <dependencies> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-all</artifactId> <version>5.12.0</version> </dependency> </dependencies> 搭建开发环境 我们只需要建立一个java项目就可以了,项目截图: 点对点的消息模型,只需要一个消息生成者和消息消费者,下面我们编写代码。 生产者: package com.winner.activemq; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import javax.jms.*; /** * 消息的生产者(发送者) * Created by winner_0715 on 2016/7/6. */ public class

ActiveMQ

穿精又带淫゛_ 提交于 2020-01-16 23:19:14
一、什么是消息中间件   消息中间件利用高效可靠的消息传递机制进行平台无关的数据交流,并基于数据通信来进行分布式系统的集成。通过提供消息传递和消息排队模型,它可以在分布式环境下扩展进程间的通信。对于消息中间件,常见的角色大致也就有Producer(生产者)、Consumer(消费者)   常见的消息中间件产品: ( 1 ) ActiveMQ   ActiveMQ 是Apache出品,最流行的,能力强劲的开源消息总线。ActiveMQ 是一个完全支持JMS1.1和J2EE 1.4规范的 JMS Provider实现 ,尽管JMS规范出台已经是很久的事情了,但是JMS在当今的J2EE应用中间仍然扮演着特殊的地位。   主要特点:   1. 多种语言和协议编写客户端。语言: Java, C, C++, C#, Ruby, Perl, Python, PHP。应用协议: OpenWire,Stomp REST,WS Notification,XMPP,AMQP   2. 完全支持JMS1.1和J2EE 1.4规范 (持久化,XA消息,事务)   3. 对Spring的支持,ActiveMQ可以很容易内嵌到使用Spring的系统里面去,而且也支持Spring2.0的特性   4. 通过了常见J2EE服务器(如 Geronimo,JBoss 4, GlassFish,WebLogic)的测试

ActiveMQ面试题

孤街浪徒 提交于 2020-01-16 23:05:09
什么是 activemq activeMQ是一种开源的,实现了JMS1.1规范的,面向消息(MOM)的中间件,为应用程序提供高效的、可扩展的、稳定的和安全的企业级消息通信。 activemq 的作用以及原理 Activemq 的作用就是系统之间进行通信。 当然可以使用其他方式进行系统间通信, 如果使用 Activemq 的话可以对系统之间的调用进行解耦, 实现系统间的异步通信。 原理就是生产者生产消息, 把消息发送给activemq。 Activemq 接收到消息, 然后查看有多少个消费者, 然后把消息转发给消费者, 此过程中生产者无需参与。 消费者接收到消息后做相应的处理和生产者没有任何关系 activemq 的几种通信方式 3.1publish( 发布 )-subscribe( 订阅 )( 发布 - 订阅方式 ) 发布/订阅方式用于多接收客户端的方式.作为发布订阅的方式,可能存在多个接收客户端,并且接收端客户端与发送客户端存在时间上的依赖。一个接收端只能接收他创建以后发送客户端发送的信息。作为subscriber ,在接收消息时有两种方法,destination的receive方法,和实现message listener 接口的onMessage 方法 3.2 p2p(point-to-point)( 点对点 ) p2p的过程则理解起来比较简单。它好比是两个人打电话