activemq

Integration of JavaScript and JMS [closed]

给你一囗甜甜゛ 提交于 2019-11-29 05:12:50
Where can I find a guide for integrating JavaScript and JMS (Java Messaging Service)? I would like a best practice or established technology that allows me to directly or indirectly receive messages from a topic and update a site based on the message. I was thinking of creating two components, a servlet for the Web module, and an MDB (Message-Driven Bean) for the EJB module. The web client will comsume messages from the JMS topic, and the MDB will handle the onMessage. Does this sound correct? Have you seen any examples? Edit: I am using ActiveMQ for the JMS. I think this is your answer. Looks

linux下zookeeper、redis、activemq、solr、mysql、nginx启动、停止、查看状态命令

你说的曾经没有我的故事 提交于 2019-11-29 04:13:10
一、zookeeper 首先进入zookeeper/bin目录下 *启动 ./zkServer.sh start *停止 ./zkServer.sh stop *查看状态 ./zkServer.sh status 二、redis 1、 redis简洁安装 redis简洁安装步骤参考redis3.0简洁安装 进入redis/bin目录,执行命令: *启动 注:加上‘&’号后redis可以后台程序方式运行,启动后按CTRL+C不会退出redis ./redis-server & 或者修改redis.conf,把daemonize no修改成daemonize yes,保存退出;daemonize表示守护线程,开启后表示后台启动 ./redis-server ./redis.conf *停止 ./redis-cli shutdown *查看状态 ps -ef |grep redis 2、如果已redis做成服务可参考如下启动方式: 注:将redis做成服务步骤:redis服务 在任意目录下执行如下命令: *启动 service redisd start *停止 service redisd stop *查看状态 service redisd status 注:详细可参考博文https://www.cnblogs.com/gzdlh/p/8148644.html 三、activemq

How to activemq in ssl

心已入冬 提交于 2019-11-29 02:28:25
I'm trying to send messages via jms (activemq) but I want it to be in ssl protocol. It actuality works in tcp for now. I use jndi, with a virtual topic and 2 queues. Could somebody help me, I tryed this but I get stuck the server won't start : http://activemq.apache.org/how-do-i-use-ssl.html thx edit : The log says : "The reference to entity "needClientAuth" must end with the ';' delimiter." I will answer my own question : First of all inside ..../apache-activemq-5.11.1/conf/activemq.xml : <transportConnectors> <transportConnector name="ssl" uri="ssl://0.0.0.0:61617?trace=true&needClientAuth

High Performance JMS Messaging

不羁的心 提交于 2019-11-29 01:46:22
I read slides from this year's UberConf and one of the speakers is making the argument that Spring JMS adds a performance overhead to your message queue system, however I don't see any evidence to support that in the slides. The speaker also makes the case that point-to-point is faster than the traditional "publish-subscribe" method because each message is sent only once instead of being broadcasted to every consumer. I'm wondering if any experienced Java messaging gurus can weigh-in here and clarify a few technicalities: Is there actually a performance overhead incurred by using Spring JMS

ActiveMQ学习笔记

心不动则不痛 提交于 2019-11-29 00:49:44
消息中间件产生的背景 1、在客户端与服务器进行通讯时,客户端调用后,必须等待服务对象完成处理返回结果才能继续执行,这个过程是基于请求与响应的同步过程。 2、客户与服务器对象的生命周期紧密耦合,客户进程和服务对象进程都都必须正常运行;如果由于服务对象崩溃或者网络故障导致用户的请求不可达,客户会受到异常。 3、点对点通信: 客户的一次调用只发送给某个单独的目标对象。 JMS是什么? JMS是J2EE的13个规范之一,提供的是消息中间件的规范。 JMS只是消息服务的一组规范和接口,并没有具体的实现,而ActiveMQ就是JMS规范的具体实现 activeMQ是什么?   是Apache公司旗下的一个消息总线 ActiveMQ是一个开源兼容Java Message  Service (JMS) 1.1面向消息的中件间. 来自Apache Software Foundation. ActiveMQ提供松耦合的应用程序架构. activeMQ能干什么?   用来在服务与服务之间进行异步通信的 activeMQ优势 1.流量肖锋 2.任务异步处理 特点:可以解耦合 消息通信机制: 所有MQ基本都分为两种, 1.点对点模式,(PTP模式),他的目的地对象是queue队列; 》一个消息只能被一个服务接收 》消息一旦被消费,就会消失 》如果没有被消费,就会一直等待,直到被消费

Spring Boot与ActiveMQ整合

ぐ巨炮叔叔 提交于 2019-11-28 23:59:58
Spring Boot 与 ActiveMQ 整合 1 使用内嵌服务 ( 1 )在 pom.xml 中引入 ActiveMQ 起步依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter- activemq </artifactId> </dependency> ( 2 )创建消息生产者 /** * 消息生产者 * @author Administrator */ @RestController public class QueueController { @Autowired private JmsMessagingTemplate jmsMessagingTemplate; @RequestMapping("/send") public void send(String text){ jmsMessagingTemplate.convertAndSend("itcast", text); } } ( 3 )创建消息消费者 @Component public class Consumer { @JmsListener(destination="itcast") public void readMessage(String text){ System.

SpringBoot整合ActiveMQ发送邮件

淺唱寂寞╮ 提交于 2019-11-28 21:52:32
虽然ActiveMQ以被其他MQ所替代,但仍有学习的意义,本文采用邮件发送的例子展示ActiveMQ 1. 生产者 1.1 引入maven依赖 1.2 application.yml配置 1.3 创建配置类ConfigQueue 1.4 创建生产者类Producer 1.5 启动类AppProducer 2. 消费者 2.1 引入maven依赖 2.2 application.yml配置 2.3 创建消费者类Consumer 2.4 启动类AppConsumer 3. 启动截图 3.1 生产者截图 3.2 消费者截图 3.3 ActiveMQ后台截图 3.4 邮件系统截图 1. 生产者 1.1 引入maven依赖 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.itmayiedu</groupId> <artifactId

Apache ActiveMQ browser can't connect to JMX console

♀尐吖头ヾ 提交于 2019-11-28 21:31:02
I am using Apache ActiveMQ version 5.8.0 and I downloaded Apache ActiveMQ Browser version 2.5.2.8 Within Apache ActiveMQ I edited the activemq.xml configuration to use JMX: <broker xmlns="http://activemq.apache.org/schema/core" useJmx="true" brokerName="localhost" dataDirectory="${activemq.data}"> <!-- This needed to be set to true, otherwise JMX won't start in 5.8.0 --> <managementContext> <managementContext createConnector="true"/> </managementContext> </broker> Within the startup script I set the JMX settings as follows: #ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=11099 "

Avoiding duplicated messages on JMS/ActiveMQ

泪湿孤枕 提交于 2019-11-28 20:29:32
Is there a way to suppress duplicated messages on a queue defined on ActiveMQ server? I tried to define manually JMSMessageID, (message.setJMSMessageID("uniqueid")), but server ignores this modification and deliver a message with built-in generated JMSMessageID. By specification, I didn't found a reference about how to deduplicate messages. In HornetQ, to deal with this problem, we need to declare the HQ specific property org.hornetq.core.message.impl.HDR_DUPLICATE_DETECTION_ID on message definition. i.e.: Message jmsMessage = session.createMessage(); String myUniqueID = "This is my unique id"

ActiveMQ

这一生的挚爱 提交于 2019-11-28 19:40:27
1,ActiveMQ Apache ActiveMQ是Apache软件基金会所研发的开放源代码消息中间件;由于ActiveMQ是一个纯Java程序,因此只需要操作系统支持Java虚拟机,ActiveMQ便可执行。 2, ActiveMQ 的安装 1.下载ActiveMQ 去官方网站下载:http://activemq.apache.org/activemq-5152-release.html 2.运行ActiveMQ 解压缩apache-activemq-5.5.1-bin.zip到C盘,然后双击C:\apache-activemq-5.15.2\bin\win64\activemq.bat运行ActiveMQ程序。 配置环境变量path 启动ActiveMQ以后,登陆:http://localhost:8161/admin/,进入管理界面。 用户名与密码均为:admin 点对点方式中 消费者集群默认采用均摊方式 发布订阅模式 需要先订阅,才能获取消息(实时模式)分组模式 3, 4,ActiveMQ ---JMS 规范----点对点通讯 producer: public class Producer { private static final String URL = "tcp://localhost:61616"; private static final String