We need Chirpstack application server to publish device events to a RabbitMQ exchange, which is possible from version 3.7, according to the documentation, but when configuring the application, the Rabbit MQ integration is simply not available.
The only available integrations are the following ones:
As an application integration, forwarding all the device events from a specific application to a specific external queue ([chirpstack site]/chirpstack.io/application-server/integrations/amqp/)
We need the second one. It is true though, that the documentation has a placeholder for configuring this, that seems to be a general configuration, and not application specific ([chirpstack site]/application-server/install/config/)
# AMQP / RabbitMQ.
[application_server.integration.amqp]
# Server URL.
#
# See for a specification of all the possible options:
url="amqp://guest:guest@localhost:5672"
# Event routing key template.
#
# This is the event routing-key template used when publishing device
# events.
event_routing_key_template="application.{{ .ApplicationID }}.device.{{ .DevEUI }}.event.{{ .EventType }}"
This configuration shall enable specifying a rabbit exchange, but it seems this is not possible and it will always use the “AMQP Default” RabbitMQ exchange. Please, feel free to correct me if I’m mistaken.
The routing key might specify the name of the queue, but it will only be possible to forward all the events to that single queue, not being able to make bindings to different queues through a routing key template.
There are also configurations for the rest of application integrations at general level, that are also available per-application in the Web User Interface, so I’m a little bit confused.
I also tried to configure these parameters in the AS config file, and I was unable to forward device events to Rabbit.
This topic does not talk about this, but I think it is important to add some context about what RabbitMQ is.
RabbitMQ was always an AMQP broker at its heart. Prior to 3.12.0, MQTT was supported as a plugin, which adapted MQTT traffic through its AMQP internals. From 3.12.0, MQTT became natively supported.
In the default Docker examples for Chirpstack, the Mosquito MQTT broker is used for bridging the Chirpstack gateway bridge with the Network Server (now the main app of Chirpstack itself), as well as between the Chirpstack Application Server (now also the main app of Chirpstack itself) with any 3rd party apps (the MQTT integration, which is implicitly enabled).
So, RabbitMQ can be a drop-in replacement for the default Mosquitto MQTT broker, without bothering with AMQP. Or, perhaps AMQP could be used for the integration between the AS and 3rd party app (as described in an earlier post).