-
Notifications
You must be signed in to change notification settings - Fork 463
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 dead letter support in RabbitMQ pubsub #883
Conversation
@skyao can you please review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious about the format of the DLQ and DLX strings
pubsub/rabbitmq/rabbitmq.go
Outdated
var args amqp.Table | ||
if r.metadata.enableDeadLetter { | ||
// declare dead letter exchange | ||
dlxName := fmt.Sprintf("%s-%s", defaultDeadLetterExchangeNamePrefix, queueName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not let the DLX and DLQ be free form? Is this convention mandated by RabbitMQ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not convention mandated by RabbitMQ. Prefixes(DLX and DLQ) can be customized by metadata. Is this OK? In this case, the queueName is consumerID-Topic
, the dlx name will be dlxPrefixFromMetadata-consumerID-Topic
, the dlq name will be dlqPrefixFromMetadata-consumerID-Topic
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Taction sorry for the delayed response. What do you think about having the names be formats (e.g. dlq-%s
-> usage: dlxName := fmt.Sprintf(defaultDeadLetterExchangeFormat, queueName)
).
This would like you specify a constant or plug the queue name in anywhere you want. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping @Taction, we'd like to get this merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Taction pls resolve conflicts |
…nto feat_add_rabbitmq_dead_letter # Conflicts: # pubsub/rabbitmq/metadata_test.go
@Taction have you addressed all review comments? |
@halspang Please, check this with Matt. |
@Taction please fix CI failure. |
@daixiang0 The MQTT tests can be flakey at times. I re-ran the jobs. Hoping some of the integration tests efforts in 1.5 will resolve this. |
@Taction CI Issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Taction I resolved conflicts today. This change looks good to me now.
@Taction Thanks for your proposed change. Would you mind to follow up dapr/docs#1834? |
@beiwei30 I'll complete the doc asap. |
Codecov Report
@@ Coverage Diff @@
## master #883 +/- ##
==========================================
+ Coverage 34.34% 34.83% +0.48%
==========================================
Files 140 141 +1
Lines 11993 12147 +154
==========================================
+ Hits 4119 4231 +112
- Misses 7450 7486 +36
- Partials 424 430 +6
Continue to review full report at Codecov.
|
* Add dead letter support * fix lint * add maxLen and maxLenBytes support * Let the DLX and DLQ be free form. Co-authored-by: Yaron Schneider <yaronsc@microsoft.com> Co-authored-by: Artur Souza <artursouza.ms@outlook.com> Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com> Co-authored-by: Long Dai <long0dai@foxmail.com> Co-authored-by: Phil Kedy <phil.kedy@gmail.com> Co-authored-by: Long Dai <long.dai@intel.com> Co-authored-by: Ian Luo <ian.luo@gmail.com> Co-authored-by: cvictory <shenglicao2@gmail.com>
Description
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #882
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: