You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Imesh Gunaratne <im...@apache.org> on 2015/01/31 18:21:56 UTC

[Discuss] Messaging Now Supports Transports AMQP and MQTT

Hi Devs,

I have now introduced support for AMQP in messaging component together with
MQTT. To do this I have generalized event publisher and subscriber creation
process by introducing factory classes.

The main reason for doing this change is that I wanted to implement an
automated integration test which could start an ActiveMQ instance (using
ActiveMQ embedded server) and a Stratos server instance and run sample
applications against Mock IaaS. However as I found ActiveMQ embedded server
does not support MQTT transport out of the box however it seems to work
with AMQP.

One of the other reasons is that, during past months most of us noticed an
instability behaviour in MQTT. Once the Stratos server is run for several
hours the connection to the message broker drops.

Another important reason is that MQTT requires each client to specify a
globally unique ID. We managed to solve this by generating a random number.
A UUID is much larger than the limit specified by MQTT. This is not a
proper way of handling a Client ID in a distributed environment.

Now with this change, the default messaging transport has been set to AMQP
and it can be changed by setting the following system property:

messaging.transport=mqtt|amqp

Thanks




-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos