1
votes

I have a tomcat7 application currently accepting https calls which carry a JSON payload. So this work perfectly in a client/server relationship.

I want to be able to push data out to 'clients' so am investigating using MQTT. This work fine - I can publish/subscribe messages between MQTT broker and the 'clients'.

I want now to be able to re-use my Tomcat code. Do I configure tomcat to publish/subscribe to MQTT topics? Do I make some 3rd process which subscribes to MQTT topic and calls into tomcat.

I'm at the beginning of my investigation stage of a project. Any help/recommendations are appreciated.

1

1 Answers

0
votes

Yes it is possible, there are many client libraries available (e.g. Poho for Java), so your server can subscribe/publish messages. Now to handle multiple messages published from various clients, implement a message queue.

Checkout this, RabbitMQ MQTT Adapter https://www.rabbitmq.com/mqtt.html