Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[kapua-dev] Kapua - external message processors

Hi all,



as discussed with the community, for the next release iteration we are implementing the handling of telemetry and lifecycle messages in separate components running in their own processes (see [1] for a bird eye overview)Previously these tasks were performed by broker plugins, with the new approach components can be reused to connect to different messaging services (particularly Hono) and scaled independently. 


To implement this feature, we leveraged two new technologies in Kapua: Vertx and AMQP. Vertx is used for implementing micro services that run components, while AMQP is the protocol to implement communications between the messaging service and the components running the business logic. Nothing will change in the way devices connect to the messaging (MQTT) since AMQP is used for backend communications.


Three new components, named processors, will be added to the standard deployment: datastore, lifecycle and error processor. The first listens to data messages and stores them in the Kapua data store (Elasticsearch). The second listens to device lifecycle messages and takes care of the registration/status of the devices. Error processor, which is optional, handles the errors produced by the other two components; the current implementation just sends errors to the logger. 


We are currently putting together the pieces and soon we'll have a more stable branch in the eclipse/kapua repository for sharing. 

Meanwhile, I have a branch in my own fork of Kapua where I ported the feature for the Docker Compose deployment. It's not the official and final version, but if you are interested you can give it a try for preview. 


Clone kapua project from my fork: https://github.com/stefanomorson/kapua.git and switch to branch

feature-externalConsumer-Test


$> cd <kapua-dir>

$> mvn clean install -Dmaven.test.skip=true -Pconsole,dev

$> cd <kapua-dir>/assembly

$> mvn clean install -Pdocker,console

$> cd <kapua-dir>/deployment/docker 

$> ./docker-deploy.sh


check that Docker runtime has enough resources and that every container is running, then you can connect a Kura device and verify its status and published data through the console.



[1] https://docs.google.com/presentation/d/1zsiQNOoD1PYckzO3a2XXFxeENVcZnmsAnI5GQXVVGlo/edit#slide=id.g3a4d1f4b8f_2_125


Stefano Morson

Eurotech Spa



Back to the top