Conduit RabbitMQ Connector v0.3.0
Conduit RabbitMQ Connector v0.3.0 was released today, propagating AMQP 0.9 headers via OpenCDC headers, and with a breaking change on the routingKey
, but this will make it more flexible to use with other connectors by utilizing Go templates.
Changes
Docker Image Update
The RabbitMQ Docker image has been updated to version 4.1, ensuring compatibility with the latest RabbitMQ features and improvements.
Metadata Propagation to RabbitMQ Headers
Record metadata keys prefixed with rabbitmq.header.
are now propagated to AMQP 0.9 headers (and vice versa).
This feature allows users to pass custom headers when publishing messages to RabbitMQ.
Example:
version: 2.2
pipelines:
- id: rabbitmq-headers-example
connectors:
- id: source
# other connector configuration
processors:
- id: add-headers
plugin: builtin:field.set
settings:
field: metadata.rabbitmq.header.app_id
value: "inventory-service"
destination:
plugin: rabbitmq
config:
...
In this example, the messages sent to RabbitMQ will include app_id
in the headers:
{
"app_id": "inventory-service",
}
RoutingKey as a Go Template
The routingKey
configuration now supports Go templates, enabling dynamic routing key generation based on metadata.
- Breaking Change: This replaces the previous static
routingKey
implementation. - Improvement: Users can now use a single pipeline with a processor to set
rabbitmq.routingKey
dynamically, reducing the need for multiple pipelines.
Example: A processor can set rabbitmq.routingKey
to a desired value, which will then be used as the topic exchange routing key.
Thanks @rauanmayemir for these contributions!
If you have any questions, or more feedback feel free to join our Discord Community
For more information, check out the RabbitMQ Connector documentation.