Skip to content

feat(amqp10): implement queue declaration - #237

Open
sharathb5 wants to merge 6 commits into
feature-amqp10from
190-provider-interface-implement-declarequeue
Open

sharathb5 wants to merge 6 commits into
feature-amqp10from
190-provider-interface-implement-declarequeue

Conversation

@sharathb5

Copy link
Copy Markdown
Contributor

Add AMQP 1.0 queue declaration with compatible queue options and coverage.

Signed-off-by: Sharath Bhattiprolu <sharathjb23@gmail.com>
@sharathb5 sharathb5 linked an issue Oct 8, 2026 that may be closed by this pull request
@sharathb5
sharathb5 changed the base branch from main to feature-amqp10 October 8, 2026 17:14
Signed-off-by: Sharath Bhattiprolu <sharathjb23@gmail.com>
@sharathb5
sharathb5 marked this pull request as ready for review October 8, 2026 17:33
Comment thread internal/provider/connectors/rabbitmq/amqp10/amqp10_provider.go Outdated
Comment thread internal/provider/connectors/rabbitmq/amqp10/amqp10_provider.go
Comment thread internal/provider/connectors/rabbitmq/amqp10/amqp10_provider.go Outdated
Signed-off-by: Sharath Bhattiprolu <sharathjb23@gmail.com>
client *amqp.AMQPManagementClient
}

func newRabbitQueueManagementClient(connectionConfig *pb.ConnectionConfiguration) (*rabbitQueueManagementClient, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is the mgmt client duplicated here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok I removed the integration-only client wrapper and now use the shared AMQPManagementClient.Request method for queue reads and cleanup.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you need a mock mgmt client, use the testify mock package to implement the mgmt interface.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually I think this may be what you are looking for:

type ManagementClientMock struct {

Let me know if you have questions on how to use it. It's pretty cool.

Comment thread tests/integration/amqp10_provider_connect_test.go Outdated
Signed-off-by: Sharath Bhattiprolu <sharathjb23@gmail.com>
Comment thread internal/provider/connectors/amqp/mgmt_rest.go Outdated
Comment thread internal/provider/connectors/amqp/mgmt_rest.go
Comment thread internal/provider/connectors/amqp/mgmt_rest.go
Comment thread internal/provider/connectors/rabbitmq/amqp10/amqp10_provider.go Outdated
Signed-off-by: Sharath Bhattiprolu <sharathjb23@gmail.com>
Comment thread internal/provider/connectors/rabbitmq/amqp10/amqp10_provider.go
Signed-off-by: Sharath Bhattiprolu <sharathjb23@gmail.com>
}

func queueSpecification(source *pb.Source) (rabbitmqamqp.IQueueSpecification, error) {
if source.GetType() == pb.Source_STREAM {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it's fine to ignore streams for now since we'll soon implement streams.

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.

Provider Interface: implement declareQueue

2 participants