Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for messageId, correlationId, and type in RabbitMQ bindings #3661

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abossard
Copy link
Contributor

@abossard abossard commented Feb 5, 2025

Description

This pull request introduces several enhancements to the RabbitMQ bindings and metadata utilities. The most important changes involve adding new utility functions to extract specific metadata fields and updating the RabbitMQ publishing functions to utilize these new utilities.

Enhancements to metadata utilities:

  • metadata/utils.go: Added TryGetMessageId, TryGetCorrelationId, and TryGetType functions to extract messageId, correlationId, and type from metadata properties, respectively. [1] [2]

Updates to RabbitMQ bindings:

  • bindings/rabbitmq/rabbitmq.go: Modified the Invoke method to extract and set MessageId, CorrelationId, and Type from the request metadata using the new utility functions.
  • pubsub/rabbitmq/rabbitmq.go: Updated the publishSync method to extract and set ContentType, MessageId, CorrelationId, and Type from the request metadata using the new utility functions.

Issue reference

Please reference the issue this PR will close: #3650

Checklist

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

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

@abossard abossard requested review from a team as code owners February 5, 2025 10:58
@abossard abossard force-pushed the supporting_more_properties_for_rabbitmq_on_main branch from f650ec4 to d0c75f6 Compare February 5, 2025 18:07
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.

RabbitMQ Messages should have some cloud event property fields populated, e.g. message id and correlation id
1 participant