apollo 源自 activemq,以快速、可靠著称,支持多协议:STOMP, AMQP, MQTT, Openwire, SSL, and WebSockets,下面就STOMP, AMQP, MQTT客户端进行介绍。

以下针对apollo 1.7.1 进行介绍

1、stomp

1.1 stomp client

apollo1.7.1 支持stomp1.0、1.1、1.2三个版本,各种语言的客户端支持的版本各不相同,下面是官方给的一个完整的列表

NameLanguageDescriptionCompliance

activemessaging

Rubyan attempt to bring the simplicity and elegance of Rails development to the world of messaging1.0

AnyEvent::STOMP

Perla lightweight event-driven STOMP client1.0

Apache CMS

C++is a JMS-like API for C++1.0

Apache NMS

C# and .Neta JMS-like API for .Net1.0

as3-stomp

Flashan actionscript 3 implementation of the STOMP protocol1.0

delphistompclient

Delphi and FreePascala STOMP client for Embarcadero Delphi and FreePascal1.0

dstomp

Dynamic Ca STOMP client library written in Dynamic C for Rabbit1.0

Gozirra

Javaa lightweight implementation of the STOMP specification1.0

hxStomp

Haxea TCP socket-based STOMP protocol client library written for the Haxe language1.0

libstomp

Can APR based C library1.0

Net::Stomp

Perla Streaming Text Orientated Messaging Protocol client1.0

Net::STOMP::Client

PerlSTOMP object oriented client module1.0 1.1 1.2

objc-stomp

Objective-Ca simple STOMP client based on AsynSocket1.0

POE::Component::Client::Stomp

Perla Perl extension for the POE Environment1.0

onstomp

Rubyclient library for message passing with brokers that support the STOMP protocol1.0 1.1

Public.Protocols.Stomp

PikePublic.Protocols.Stomp1.0

pyactivemq

Pythonmodule for communicating with the ActiveMQ message broker1.0

React/STOMP

PHPSTOMP bindings for React1.1

simplisticstompclient

PHPa simpler STOMP client for PHP1.0

Stampy

Javaa Java implementation of the STOMP 1.2 specification1.2

stomp

PHPSTOMP client extension1.0

stomp

Rubyclient for the STOMP messaging protocol1.0 1.1

stomper

Pythona client implementation of the STOMP protocol1.0

stomp.erl

Erlanga STOMP client for Erlang1.0

stompest

Pythona full-featured STOMP implementation for Python including both synchronous and asynchronous clients1.0 1.1 1.2

StompKit

Objective-Cmodern event-driven Objective-C library for STOMP1.2

stompy

Pythonimplementation of the STOMP protocol in Python1.0

stompngo

Goa STOMP 1.1+ Client Package1.0 1.1 1.2

stomp-php

PHPthe FuseSource PHP client implementation1.0

stomp.py

Pythona Python client library which can also be run as a standalone, command-line client for testing.1.0 1.1 1.2

stomp.js

JavaScriptis a JavaScript library for Web browsers using STOMP Over HTML Web Sockets1.0 1.1

tStomp

TCLa STOMP Implementation for TCL1.1

Zend_Queue

PHPfor Zend PHP clients1.0

1.2 stomp client官方示例

C#: NMS

C: CMS

JAVA:fusesource

Perl:Net::STOMP::Client

Python:stomppy、stompest

ruby:stomp

2、AMQP协议

2.1  AMQP client

Apollo 1.7.1 支持AMQP 1.0,凡是支持AMQP1.0的client,都可以与Apollo 1.7.1 进行交互。

当然,为了更好地支持amqp协议,建议你在apollo的配置文件中添加以下amqp的默认协议端口

<connector id="amqp" bind="tcp://0.0.0.0:5672"/>
<connector id="amqps" bind="ssl://0.0.0.0:5671"/>

 2.2 amqp client 官方示例

官方特别推荐了 Apache Qpid Proton project (支持C、C++、Java、Python) http://qpid.apache.org/proton/

java: Proton

python: Proton

3、mqtt协议

3.1 apollo 1.7.1支持 v3.1 协议,支持以下客户端

完整列表请移步这里 https://github.com/mqtt/mqtt.github.io/wiki/libraries

3.2 官方示例

Java: mqtt-client

05-11 17:48