activemq 下载以及安装、应用
https://activemq.apache.org/components/classic/download/
安装
http://activemq.apache.org/artemis/download.html
创建broker
将artemis解压完成后,在重新建一个文件夹artmisbroker运行
artemis.cmd create C:\artmisbroker --user mq --password 123
即可在artmisbroker目录下生成所需的文件运行artemis
"C:\artmisbroker\bin\artemis" run使用Windows service方式运行artemis
"C:\artmisbroker\bin\artemis-service.exe" install
"C:\artmisbroker\bin\artemis-service.exe" start停止 windows service:
"C:\artmisbroker\bin\artemis-service.exe" stop卸载windows service
"C:\artmisbroker\bin\artemis-service.exe" uninstall访问 http://localhost:8161/console 进入监视界面
在springboot中的使用
依赖
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-artemis</artifactId><version>2.0.5.RELEASE</version>
</dependency>
配置
spring.artemis.mode=native
spring.artemis.host=localhost
spring.artemis.port=61616
spring.artemis.user=mq
spring.artemis.password=123
Producer
@Component
public class Producer {@Autowiredprivate JmsMessagingTemplate jmsMessagingTemplate;public void send(Destination destination, final String message) {jmsMessagingTemplate.convertAndSend(destination, message + "from queue");}@JmsListener(destination="out.queue")public void consumerMessage(String text){System.out.println("从out.queue队列收到的回复信息为:"+text);}
}
Consumer
@Component
public class Consumer {@JmsListener(destination = "mytest.queue")@SendTo("out.queue")public String receiveQueue(String text) {System.out.println("Consumer收到的信息为:"+text);return "return message "+text;}
}
Rest使用
@ResponseBody
@RequestMapping(value = "/mqtest", method = RequestMethod.GET)
public Object mqtest() {Destination destination = new ActiveMQQueue("mytest.queue");producer.send(destination, "I am YeJiaWei");return "OK";
}
activemq 下载以及安装、应用相关推荐
- linux环境下装mq,ActiveMQ下载与安装(Linux环境下进行)
下载 官方网站:http:activemq.apache.org/ 安装(liunx) 1.将apache-activemq-5.12.0-bin.tar.gz(liunx环境下的压缩包)上传至服务器 ...
- activemq linux教程,Linux及Windows下ActiveMQ下载与安装教程
Windows: 1.官网下载地址:这里 2.百度网盘下载:这里 提取码:8rbi Linux: 1.百度网盘下载:这里 提取码:l8hx java开发工具下载地址及安装教程大全,点这里. 更多深度技 ...
- ActiveMQ简介与安装
1. ActiveMQ简介 ActiveMQ是一种开源的,实现了JMS1.1规范的,面向消息(MOM)的中间件,为应用程序提供高效的.可扩展的.稳定的和安全的企业级消息通信.ActiveMQ使用Apa ...
- 企业级实战01_ActiveMQ 下载、安装、运行、实战需求
ActiveMQ 下载.安装.运行.实战需求 文章目录 一.ActiveMQ简介 1. 什么是ActiveMQ? 2. ActiveMQ能干什么? 3. ActiveMQ特点 4. MOM基本功能 5 ...
- activemq之Windows安装
首先进入官网: http://activemq.apache.org/ 这里有两种版本:一种是经典版本,一种是面向未来的版本,这里选择经典版本 如下: 解压下来: 进入win64文件夹 直接activ ...
- MySQL下载与安装教程以及环境变量配置
MySQL下载 1 搜索mysql 选择mysql downloads 如下 2 点击滑动到底部选择社区版本(免费) 如下 3 选择Community Server 如下 4 选择对应的版本下载 我选 ...
- java jdk 1.8 安装_下载、安装、配置 java jdk1.8
近期配置react native的开发环境,所以就从配置环境开始.rn的环境配置有那么几项,其中重要的一个就是java jdk(Java Development Kit 的缩写),那么以下就是下载.安 ...
- vs安装一直在提取文件_Visual Studio 2019下载及安装教程
宸1分钟前 这可是我珍藏多年的资源啊. Visual Studio 2019 Microsoft Visual Studio(简称VS)是美国微软公司的开发工具包系列产品.是目前最流行的Windows ...
- python安装包_迈出Python学习第一步:Python开发环境的下载与安装
所谓"磨刀不误砍柴工"."工欲善其事,必先利其器",都在告诉我们一个道理:要做好一个事情,事先做好充分的准备工作是非常重要的.所以在我们正式学习用Python编 ...
- oracle怎么下载安装,Oracle数据库的下载和安装方法
一.Oracle数据的下载与安装: 我这里是Oracle Database 11g Release 2版本的. 1.百度云链接: 链接:https://pan.baidu.com/s/1QYvBVS3 ...
最新文章
- 树莓派4外置wifi天线_树莓派打造最强车载娱乐终端(1)音乐和WiFi
- 标准采购订单的计算方案确定
- 接口 类型转换 try-catch(学习笔记)
- python爬虫多线程是什么意思_python爬虫中多线程的使用详解
- html鼠标点击伪类,CSS伪类:CSS3鼠标滑过按钮动画
- oracle无效的关联运算符,菜鸟请教:关联操作符=>用法
- win10休眠_电脑升级win10后,必做的5项优化,至少提升20%的运行速度
- 优秀的程序员是如何诞生的?
- 吴恩达“旗下”Drive.ai无人出租车来了!新硬件成本更低,外挂4块屏幕
- html 悬停显示标题,JS实现TITLE悬停长久显示效果完整示例
- 使 VC2013 编写的程序运行在其它电脑上
- 内存引起的蓝屏问题排查
- 五大车载操作(VOS)系统
- MUI框架开发app中出现的问题(持续更新中...)
- 车载以太网测试:以太网测什么
- python中逗号在print的作用_Python中逗号的三种作用
- 【不懂就问】CPU 到底是怎么识别代码的?
- TFLearn初探之Activation与Dropout
- 【JS逆向系列】x96参数与jsvmp初体验
- 入门 | 一文简述深度学习优化方法——梯度下降