Skip to content
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 RabbitMQ management protocol #300

Open
GamePad64 opened this issue Feb 2, 2025 · 7 comments · May be fixed by #304
Open

Add RabbitMQ management protocol #300

GamePad64 opened this issue Feb 2, 2025 · 7 comments · May be fixed by #304
Labels
enhancement New feature or request low priority

Comments

@GamePad64
Copy link

RabbitMQ devs have deprecated v1 address format. v2 format addresses assume, that queues and exchanges are already created.

Queues and exchanges can be created using a new RabbitMQ-specific API:
rabbitmq/rabbitmq-server#10559

I think, it would be a good idea to expose this API in a separate crate. Or to create a crate for HTTP-over-AMQP protocol, so end-users could implement RabbitMQ-specific logic by themselves.

@minghuaw
Copy link
Owner

minghuaw commented Feb 2, 2025

I didn't look close enough, but I'm not aware of an HTTP-over-AMQP protocol. There is, however, something close to that concept, which is the AMQP management extension and is implemented in fe2o3-amqp-management. This is already used for querying certain service status of Azure Service Bus and Azure Event Hubs. Could you please take a quick look at that crate and see if that suits your needs?

@GamePad64
Copy link
Author

I have checked the fe2o3-amqp-management, but that is a different protocol. RabbitMQ explicitly doesn't support it.
HTTP-over-AMQP is officially called HTTP Semantics and Content over AMQP

@minghuaw
Copy link
Owner

minghuaw commented Feb 2, 2025

Took a Quick Look at the working draft, and it doesn't seem to be too complicated. The overall API design would probably look similar to that of the management extension. I'll try to bring an initial implementation in the next few days. Feel free to give it a shot too if you're interested

@minghuaw
Copy link
Owner

minghuaw commented Feb 4, 2025

@GamePad64 It's been a little busier than I expected, but I'm still aiming for drafting something within this week.

@minghuaw
Copy link
Owner

minghuaw commented Feb 7, 2025

@GamePad64 Are you aware of any existing impl of HTTP over AMQP draft? There's a few ambiguities in the working draft, kinda wanna see how those are handled by others

@minghuaw minghuaw linked a pull request Feb 9, 2025 that will close this issue
@minghuaw
Copy link
Owner

minghuaw commented Feb 9, 2025

A quick update.

The initial implementation will likely be limited to the projected mode for now because the tunneled mode would require the entire HTTP 1.1 message to be encoded in a single data section in AMQP. However, the well-tested HTTP 1.1 codecs in the rust ecosystem are are internal structs hidden in the low level HTTP crates like hyper and async-h1. hyper does have vision on separating the codec into its own crate but it's not there yet.

The projected mode implementation as of now needs to resolve one ambiguity (xinchen10/awesome-amqp#24) regarding how the HTTP message body should be encoded.

I'd imagine the rest of connection/session/link pair setup to be fairly similar to that of the management extension, and we could probably re-use the management extension.

Feel free to post any new information or other implementations you found that may help clarifying/solving some of the problems listed above.

@minghuaw minghuaw added the enhancement New feature or request label Feb 14, 2025
@minghuaw
Copy link
Owner

minghuaw commented Feb 14, 2025

Given that the HTTP-over-AMQP remains a working draft and the fact that there is an "official" tool https://crates.io/crates/rabbitmqadmin written in rust using the latest v2 API, this will be a low priority.

A rough conversion between HTTP and AMQP can be found in the draft #304 if anyone is interested in implementing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants