Merged
Conversation
To uniform all the AMQP 1.0 clients interfaces" Signed-off-by: Gabriele Santomaggio <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the consumer options API to use an enum-based ConsumerFeature type instead of separate boolean fields (DirectReplyTo and PreSettled). This change aims to create a more uniform interface across AMQP 1.0 clients by ensuring only one feature mode can be active at a time.
Changes:
- Introduced
ConsumerFeatureenum with three values:DefaultSettle,DirectReplyTo, andPreSettled - Replaced
DirectReplyToandPreSettledboolean fields inConsumerOptionswith a singleFeaturefield - Updated all consumer creation call sites to use the new enum-based API
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/rabbitmqamqp/amqp_types.go | Added ConsumerFeature enum type and updated ConsumerOptions struct to use Feature field instead of boolean flags |
| pkg/rabbitmqamqp/amqp_consumer.go | Updated comments to clarify receiver link creation logic |
| pkg/rabbitmqamqp/amqp_connection.go | Updated NewRequester to convert DirectReplyTo boolean to Feature enum, added documentation comments |
| pkg/rabbitmqamqp/amqp_consumer_test.go | Updated test cases to use new Feature enum values |
| pkg/rabbitmqamqp/amqp_connection_recovery.go | Updated comments (incorrectly changed "Default" to "DefaultSettle") |
| pkg/rabbitmqamqp/uri.go | Updated comment (incorrectly changed "Default values" to "DefaultSettle values") |
| pkg/rabbitmqamqp/amqp_exchange_test.go | Updated test name (incorrectly changed "Default" to "DefaultSettle") |
| docs/examples/pre_settled/pre_settled.go | Updated example to use Feature: PreSettled |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Gabriele Santomaggio <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the consumer options API to use an enum-based
ConsumerFeaturetype instead of separate boolean fields (DirectReplyToandPreSettled). This change aims to create a more uniform interface across AMQP 1.0 clients by ensuring only one feature mode can be active at a time.Changes:
ConsumerFeatureenum with three values:DefaultSettle,DirectReplyTo, andPreSettledDirectReplyToandPreSettledboolean fields inConsumerOptionswith a singleFeaturefield