Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

LiamPhil
Copy link
Contributor

@LiamPhil LiamPhil commented May 12, 2025

Currently for the amqp integration Chirpstack has the default exchange "amq.topic" hardcoded into the publish function.

This change would allow configuring the amqp exchange in the [integration.amqp] section of your chirpstack.toml, as a new config called 'exchange'. If 'exchange' is not configured in that section the default "amq.topic" will be used.

The Chirpstack configuration page (https://www.chirpstack.io/docs/chirpstack/configuration.html) should also be updated as follows to show the additional config:

  # AMQP / RabbitMQ integration configuration.
  [integration.amqp]

    # Server URL.
    #
    # See for a specification of all the possible options:
    # https://www.rabbitmq.com/uri-spec.html
    url="amqp://guest:guest@localhost:5672"

    # Event routing key.
    #
    # This is the event routing-key template used when publishing device
    # events. Messages will be published to the "amq.topic" exchange by default.
    event_routing_key="application.{{application_id}}.device.{{dev_eui}}.event.{{event}}"

    # Use JSON encoding instead of Protobuf (binary).
    json=true

    # The AMQP exchange the events are posted to.
    exchange="amq.topic"

And the amqp integration section of the documentation (https://www.chirpstack.io/docs/chirpstack/integrations/amqp.html) should be updated as well:

# AMQP / RabbitMQ integration configuration.
[integration.amqp]
  url="amqp://guest:guest@localhost:5672"
  event_routing_key="application.{{application_id}}.device.{{dev_eui}}.event.{{event}}"
  json=true
  exchange="amq.topic"

LiamPhil added 2 commits May 12, 2025 12:18
Update amqp.rd to allow configuration the exchange in the amqp integration. Which was previously hardcoded.
Allows config.rs to pull the exchange for the amqp integration from the chirpstack.toml
@brocaar brocaar merged commit 10731c2 into chirpstack:master May 21, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants