From MQTT Broker to CUBA

Hi All,

bright community, I need to acquire data from an MQTT Broker and store into my CUBA application.
I’d like to create an always active service, running at start-up of my application, and obviously not connected to any UI screen but I’ve no idea how to do it.
To be honest I used as a workaround a scheduled task but I suppose there’s a better way to approach the problem.

Thanks in advance!


CUBA has nothing to offer here out of the box when it comes to MQTT, but since it live on top of the spring framework you can leverage this eco system.

For MQTT communication, there is a Spring subproject called “Spring Integration”, which does a great job on when it comes to establish connectivity with all kinds of communication mechanisms.

Spring Integration has built-in support for MQTT. You can reed more about it here: Spring Integration Reference Guide


1 Like