Skip to content

Change consumer options#81

Merged
Gsantomaggio merged 3 commits intomainfrom
change_consumer_options
Feb 6, 2026
Merged

Change consumer options#81
Gsantomaggio merged 3 commits intomainfrom
change_consumer_options

Conversation

@Gsantomaggio
Copy link
Copy Markdown
Member

@Gsantomaggio Gsantomaggio commented Feb 6, 2026

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 ConsumerFeature enum with three values: DefaultSettle, DirectReplyTo, and PreSettled
  • Replaced DirectReplyTo and PreSettled boolean fields in ConsumerOptions with a single Feature field
  • Updated all consumer creation call sites to use the new enum-based API

To uniform all the AMQP 1.0 clients interfaces"

Signed-off-by: Gabriele Santomaggio <[email protected]>
@Gsantomaggio Gsantomaggio added this to the 0.6.0 milestone Feb 6, 2026
@Gsantomaggio Gsantomaggio added enhancement New feature or request breaking change Introduces a breaking change labels Feb 6, 2026
@Gsantomaggio Gsantomaggio requested a review from Copilot February 6, 2026 08:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ConsumerFeature enum with three values: DefaultSettle, DirectReplyTo, and PreSettled
  • Replaced DirectReplyTo and PreSettled boolean fields in ConsumerOptions with a single Feature field
  • 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.

Comment thread pkg/rabbitmqamqp/amqp_types.go Outdated
Comment thread pkg/rabbitmqamqp/amqp_types.go
Comment thread pkg/rabbitmqamqp/amqp_connection.go
Comment thread pkg/rabbitmqamqp/uri.go Outdated
Comment thread pkg/rabbitmqamqp/amqp_connection_recovery.go Outdated
Comment thread pkg/rabbitmqamqp/amqp_exchange_test.go Outdated
Gsantomaggio and others added 2 commits February 6, 2026 09:23
Signed-off-by: Gabriele Santomaggio <[email protected]>
@Gsantomaggio Gsantomaggio self-assigned this Feb 6, 2026
@Gsantomaggio Gsantomaggio merged commit c6a4490 into main Feb 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces a breaking change enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants