activemq和mqtt消息总线

Posted swbzmx

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了activemq和mqtt消息总线相关的知识,希望对你有一定的参考价值。

activemq服务器apollo-1.7.1下载地址
linux版本
windows版本

1.配置环境变量
———————————
前提是已经有java环境变量
———————————
linux
修改 /etc/profile文件,添加以下内容:

export APOLLO_HOME=/usr/local/apache-apollo-1.7.1
export PATH=$APOLLO_HOME/bin:$PATH

 

source /etc/profile 重新加载
2.创建代理
apollo create mybroker,有如下结果:

Creating apollo instance at: mybroker
Generating ssl keystore...

You can now start the broker by executing:  

   "/usr/local/apache-apollo-1.7.1/mybroker/bin/apollo-broker" run

Or you can setup the broker as system service and run it in the background:

   sudo ln -s "/usr/local/apache-apollo-1.7.1/mybroker/bin/apollo-broker-service" /etc/init.d/
   /etc/init.d/apollo-broker-service start

 

3.根据提示启动服务,比如:

 "/usr/local/apache-apollo-1.7.1/mybroker/bin/apollo-broker" run
得到如下结果,证明启动成功了。
    _____                .__  .__
   /  _  \ ______   ____ |  | |  |   ____
  /  /_\  \\____ \ /  _ \|  | |  |  /  _  /    |    \  |_> >  <_> )  |_|  |_(  <_> )
 \____|__  /   __/ \____/|____/____/\____/
         \/|__|  Apache Apollo (1.7.1)

Loading configuration file ‘/usr/local/apache-apollo-1.7.1/mybroker/etc/apollo.xml‘.
INFO  | OS     : Linux 3.13.0-86-generic (Ubuntu 14.04.4 LTS)
INFO  | JVM    : Java HotSpot(TM) 64-Bit Server VM 1.8.0_73 (Oracle Corporation)
INFO  | Apollo : 1.7.1 (at: /usr/local/apache-apollo-1.7.1)
INFO  | OS is restricting the open file limit to: 3125
WARN  | Please increase the process file limit using ‘ulimit -n 8500‘ 
       or configure lower connection limits on the broker connectors.
INFO  | Starting store: leveldb store at /usr/local/apache-apollo-1.7.1/mybroker/data
INFO  | Accepting connections at: tcp://0.0.0.0:61613
INFO  | Accepting connections at: tls://0.0.0.0:61614
INFO  | Accepting connections at: ws://0.0.0.0:61623/
INFO  | Accepting connections at: wss://0.0.0.0:61624/
INFO  | Administration interface available at: https://127.0.0.1:61681/
INFO  | Administration interface available at: http://127.0.0.1:61680/

 

==================================================================
windows 版本不再赘述。

以上是关于activemq和mqtt消息总线的主要内容,如果未能解决你的问题,请参考以下文章

Apache Activemq 和 Mqtt

物联网网关开发:基于MQTT消息总线的设计过程(下)

物联网网关开发:基于MQTT消息总线的设计过程(下)

Spring Boot的JMS发送和接收队列消息,基于ActiveMQ

ActiveMQ 中是不是支持 MQTT 队列?

配置activemq(开源消息总线)