Repository navigation
Implement ReconsumeLater on regex consumer - #1456
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements the previously unimplemented ReconsumeLater and ReconsumeLaterWithCustomProperties methods for the regex consumer. The implementation follows the pattern used by multiTopicConsumer, delegating the reconsume operation to the appropriate topic-specific consumer. To support this, the PR also modifies the topics() method to include the retry letter topic in the list of topics when retry is enabled.
Changes:
- Implemented
ReconsumeLaterandReconsumeLaterWithCustomPropertiesmethods forregexConsumer - Modified
topics()method to append the retry letter topic whenRetryEnableis true - Added integration test to verify ReconsumeLater functionality with regex consumers
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pulsar/consumer_regex.go | Implements ReconsumeLater methods and updates topics() to include retry topic |
| pulsar/consumer_regex_test.go | Adds integration test for ReconsumeLater with regex consumers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Motivation
Currently,
ReconsumeLaterandReconsumeLaterWithCustomPropertiesare unimplemented onregexConsumer. From what I can tell, these appear to just be missing methods rather than some fundamental limitation of the consumer implementation. Hopefully I'm correct there.Modifications
I've essentially copied over the
ReconsumeLaterWithCustomPropertiesimplementation frommultiTopicConsumer. I ran into the problem that the current code to add the RLQ topic to the consumer'sTopicsslice doesn't take into account subscriptions defined byTopicsPattern. To address this, I (perhaps naively) append the RLQ topic to the slice returned byregexConsumer.topics().Verifying this change
This change added tests and can be verified as follows:
ReconsumeLateron a regex-based consumer causes the message to be published to the RLQ.Does this pull request potentially affect one of the following parts:
Documentation