components-contrib icon indicating copy to clipboard operation
components-contrib copied to clipboard

Supporting more properties for rabbitmq

Open abossard opened this issue 8 months ago • 0 comments

Description

We want to be able to better integrate Dapr with existing RabbitMQ setups. For that we added a feature to have certain RabbitMQ message properties to go into the Dapr Metadata and also do be able to set these RabbitMQ message properties from Dapr.

For Bindings, it will just work, since Bindings are anyway RabbitMQ specific. For the PubSub, if you set supported metadata, it will be put into the RabbitMQ message properties, but you need to enable a special config, so get the RabbitMQ message properties as Metadata back. This is to prevent any accidental adding of metadata, that might conflict with metadata that you're anyway using.

Supported and tested properties: image (RabbitMQ Message Properties)

  • type
  • message_id
  • correlation_id
  • content_type

New pubusb config value:

  • publishMessagePropertiesToMetadata, to specify if properties should be published to metadata for a pub sub retriever.

Bindings Example: tbd

Pubsub Example: tbd

Issue reference

Please reference the issue this PR will close: #3650

Duplicate of

https://github.com/dapr/components-contrib/pull/3661 I messed up the DCO and didn't figure out how to fix it.

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • [x] Code compiles correctly
  • [x] Created/updated tests
  • [ ] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

abossard avatar Apr 29 '25 10:04 abossard