activemq

Java Messaging : Difference between ActiveMQ, Mule, ServiceMix and Camel

99封情书 提交于 2019-12-03 18:20:44
问题 I am new to Messaging and want to know the difference between ActiveMQ , Mule , ServiceMix and Camel Anyone knows how each of these product is different? Thanks in advance ! EDIT: Also would like to know any good place/resource to learn these things. 回答1: ActiveMQ is a message broker which implements the JMS API and supports a number of cross language clients and network protocols. It lets you implement queues or topics and write listeners or subscribers to respond to queue events. Mule and

Where can I manually configure ActiveMQ hostname?

▼魔方 西西 提交于 2019-12-03 17:47:41
问题 I'm trying to set up Apache ActiveMQ for the first time I discovered that the name of my server has an underscore in it, and that is preventing ActiveMQ from starting. It throws this exception : java.net.URISyntaxException: Illegal character in hostname at index 8: ws://cms_delta.mycompany.com:61614? maximumConnections=1000&wireFormat.maxFrameSize=104857600) ... Where can I set the hostname in configuration. This server has other alias names without underscores, or I could use the IP address.

How can I pull messages from Activemq Asynchronously

天大地大妈咪最大 提交于 2019-12-03 17:34:43
I want to write code for pulling messages from Activemq .I don't want to pull all the messages from Activemq at a time,because my requirement is whenever my Java Application receives 1 message from Activemq ,based on message body I will find corresponding HTTP Link and forward to that Link. For this entire logic I wrote 2 .java files names are MessageConsumer.java MyListener.java MessageConsumer.java file only for connection establishing.The corresponding code is in below. package PackageName; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http

Processing multiple message in parallel with ActiveMQ

戏子无情 提交于 2019-12-03 17:19:32
I'd like to process messages in a queue in parallel using a simple Processor/AsyncProcessor as a destination. The processor takes a little time per message, but each message can be handled seperately, and thus at the same time (within healthy boundaries). I'm having a hard time finding examples, especially about the xml configuration of camel routes. So far, I've defined a threadpool, route and processor: <threadPool id="smallPool" threadName="MyProcessorThread" poolSize="5" maxPoolSize="50" maxQueueSize="100"/> <route> <from uri="broker:queue:inbox" /> <threads executorServiceRef="smallPool">

Count number of messages in a JMS queue

假如想象 提交于 2019-12-03 17:13:28
问题 What is the best way to go over a JMS queue and get all the messages in it? How can count the number of messages in a queue? Thanks. 回答1: Using JmsTemplate public int getMessageCount(String messageSelector) { return jmsTemplate.browseSelected(messageSelector, new BrowserCallback<Integer>() { @Override public Integer doInJms(Session s, QueueBrowser qb) throws JMSException { return Collections.list(qb.getEnumeration()).size(); } }); } 回答2: This is how you can count No of Messages in a Queue

linux 下activemq 的部署和使用

耗尽温柔 提交于 2019-12-03 16:36:04
本文以 ActiveMQ 5.3 为例,记录了一些部署步骤和注意事项,仅供参考,更详的内容可以查看官网的指引。 1. 下载 http://activemq.apache.org/download.html 2. 传输 通过 fillzilla 文件传输工具把下载下来的打包文件上传到指定的目录文件内 /home/manorage 3. 解压 将下载下来的 apache-activemq-5.3.0-bin.tar.gz 放置于 /home/ manorage  目录下 cd /home/manorage tar xvfz apache-activemq-5.3.0-bin.tar.gz 则 ActiveMQ 的安装目录为: /home/manorage/apache-activemq-5.3.0 4. 修改 activemq 运行文件的权限 cd /home/manorage/ apache-activemq-5.3.0/bin chmod 755 activemq 5. 运行 (注意命令的空格问题) (1) 普通启动 cd /home/manorage/ apache-activemq-5.3.0 bin/ activemq (2). 指定日志文件的启动方式 bin/activemq >tmp/smlog 2>&1 & (3) 后台启动方式 nohup bin/activemq

spring cloud 集成activemq

≡放荡痞女 提交于 2019-12-03 16:35:52
需要jar <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-activemq</artifactId> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-pool</artifactId> </dependency> application.yml中配置 spring: activemq: user: admin password: admin broker-url: tcp://ip:61616 in-memory: true pool: expiry-timeout: 10000 //过期时间 idle-timeout: 30000 //链接时间 max-connections: 50 //最大链接数 enabled: true //连接池是否可用 @Component public class ActiveMqUtill{ private static Logger logger = LoggerFactory.getLogger(ActiveMqUtill.class); @Autowired private

How to enable web console on ActiveMq embedded broker

好久不见. 提交于 2019-12-03 16:35:28
I've configured an ActiveMQ 5.8.0 embedded broker using Spring 3.2.5 This is my jmsconfiguration.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> <amq:broker brokerName="localhost" dataDirectory="./data" useJmx="true" persistent="true"> <amq

ActiveMQ伪集群部署

瘦欲@ 提交于 2019-12-03 16:35:22
本文借鉴http://www.cnblogs.com/guozhen/p/5984915.html,在此基础上进行了完善,使之成为一个完整版的伪分布式部署说明,在此记录一下! 一、本文目的 介绍如何在同一台虚拟机上搭建高可用的Activemq服务,集群数量包含3个Activemq,当Activemq可用数>=2时,整个集群可用。 本文Activemq的集群数量为3个,分别命名为mq1,mq2,mq3 二、概念介绍 1、伪集群 集群搭建在同一台虚拟机上,3个Activemq分别使用不同的端口提供服务,启用1个为Master,其它2个为Slaver,同一时间仅Master队列提供服务 2、高可用 3个Activemq服务,同一时间仅Master队列提供服务,当Master队列挂掉后,其它2个Slaver自动选举出1个成为Master,整个队列服务依然可用。当挂掉的队列重新恢复后,自动加入集群。当集群仅剩下1个队列时,整个队列不可用。 3、Activemq集群数据存储方式 a) kahaDB:文件共享,默认方式 b) JDBC:数据库共享 c) LevelDB:数据共享, 本文使用方式 三、Activemq伪集群的搭建 下载地址: http://download.csdn.net/detail/u010821757/9771407 ( zookeeper-3.4.9 )     

使用Docker搭建开发环境,包括(nginx,redis,mysql,gitlab,nexus3,activemq,jenkins)

十年热恋 提交于 2019-12-03 16:35:06
使用Docker搭建开发环境 自从玩了Docker,深深的被Docker迷住,做了这么多年软件,都没想到软件会发展到这种阶段,使用容器隔离技术,将各个服务进程隔离。 记录一下自己为新成立的部门使用Docker搭建开发环境的过程,这里只是简粗暴的记录下执行命令,方便以后review,等有时间了,再详细介绍。 nginx mkdir -p /apps/nginx/www /apps/nginx/logs /apps/nginx/conf docker pull nginx docker run -p 80:80 --name nginx -v /apps/nginx/www:/www -v /apps/nginx/conf/nginx.conf:/etc/nginx/nginx.conf -v /apps/nginx/logs:/etc/nginx/logs -d nginx redis mkdir -p /apps/redis/data #写入redis默认配置 vim /apps/redis/redis.conf docker pull redis docker run -p 6379:6379 -v /apps/redis/data:/data -v /apps/redis/redis.conf:/etc/redis.conf -d --name redis redis