安装
Docker run
1 | docker run -d --name activemq -p 61616:61616 -p 61613:61613 -p 61614:61614 -p 5672:5672 -p 1883:1883 -p 8161:8161 rmohr/activemq:5.15.9 |
环境变量
- ACTIVEMQ_TCP=61616
- ACTIVEMQ_AMQP=5672
- ACTIVEMQ_STOMP=61613
- ACTIVEMQ_MQTT=1883
- ACTIVEMQ_WS=61614
- ACTIVEMQ_UI=8161
UI
1 | http://localhost:8161/admin |
用户/密码: admin
/admin
Protocols
MQTT 消息队列遥测传输
Message Queuing Telemetry Transport
MQTT Publish / Subscribe Architecture
MQTT Specification
客户端
- Eclipse Paho
1 | // eclipse paho |
JMS Java消息服务
Java Message Service
JMS Specification
https://www.oracle.com/java/technologies/java-message-service.html
AMQP 高级消息队列协议
Advanced Message Queuing Protocol
AMQP Specification
https://activemq.apache.org/amqp
STOMP 简单(或流)面向文本的消息传递协议
STOMP is the Simple (or Streaming) Text Orientated Messaging Protocol.
Stomp Specification
客户端
ActiveMQ Library:
1 | <dependency> |
Package:
1 | import org.apache.activemq.transport.stomp.StompConnection; |
Examples
Java Client Demo
https://github.com/shankai/artifacts/tree/master/activemq-example