-
Notifications
You must be signed in to change notification settings - Fork 29
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
Improved RabbitMq Compatibility #26
Improved RabbitMq Compatibility #26
Conversation
It's a bit of a mess, and I don't think, that is necessarily the way to go. But that version works for me, and is the minimal implementation to get tables to rabbitmq, which doesn't kill the connection right on registration. |
Thanks very much for the pull request, and for your research into the issue: I actually didn't realise this incompatibility between Rabbit and AMQP even existed. What a mess! As a general rule, I think I like your idea of having pluggable serialisation code for the various dialects of AMQP. That way we could provide an option to turn on "strict mode" and conform exactly to the spec, while still defaulting to "RabbitMQ mode" in the absence of that option. I guess this would be implemented as a set of classes defining overrides for the various differences between the various dialects. I'd accept a pull request on this issue, though it seems like a fairly big refactoring - if you don't have time to put the work in then I don't mind picking it up, though it might have to wait a week or two before I get the time to put some work in. We'd also have to think about what the API for selecting a dialect might look like. Regarding the content of this pull request in particular. From reading your linked documentation, I'm not sure that the serialisation code you've included is entirely compatible with RabbitMQ. For example, the documentation states that Rabbit interprets So given all that, I'd prefer a pull request which implemented full compatibility with Rabbit; then we can add strict AMQP compatibility back in later as a pluggable option. I also think that perhaps version 0.4 of |
I am kind of working on a fair a bit of refactoring for allowing such variants. Maybe I should push it to github in a branch, so you can see, what is happening. It is still quite in flux, as I am trying to see, what tools python gives me for that. The main reason for me not not to include the patch and the argument one would be the incompatibility with other brokers. The current implementation is also not feature complete, so you do not lose much there. But if rabbitmq is your top-priority, then I would remove the _read_short_string and rather include it, as it enables quite a bit of more functionality. Why I started all this, was mostly because I needed the auto-delete with ttl on queues, so I can make an application, which can lose the connection and still reconnect to it, without having to implement a bookkeeping on queues, where the client really simply died away. |
Yes, I'd be interested to see what your design looks like; I may be able to make some suggestions if you like. On the whole, I'm happy for you to change the serialisation code however you see fit because it's not part of the public API. As long as there's good test coverage I'm happy! On second thoughts, it looks like the incompatibilities between So, pending your refactorings, do you think this PR is ready to merge? |
9c826d1
to
d2fafeb
Compare
I reworked the code a bit. Now it only follows the rabbitmq code tables, and I added some more field types. |
@fwiesel GitHub's telling me there are merge conflicts. Please could you rebase your branch onto the latest master and force-push it? |
d2fafeb
to
69ca469
Compare
Done, sorry for missing that. |
Sorry, I will fix that quickly. |
Apparently, the standard defined incompatible type-codes the pre-existing Qpid/Rabbit extensions, and at least rabbitmq kept them instead. Documentation: https://www.rabbitmq.com/amqp-0-9-1-errata.html#section_3 Code: https://github.com/rabbitmq/rabbitmq-server/blob/rabbitmq_v3_5_3/src/rabbit_binary_parser.erl#L41
69ca469
to
73123ed
Compare
Looks good 🚢 |
Improved RabbitMq Compatibility
… to rabbitmq and possibly qpid
Apparently, the standard defined incompatible type-codes the pre-existing Qpid/Rabbit extensions,
and at least rabbitmq kept them instead.
Documentation: https://www.rabbitmq.com/amqp-0-9-1-errata.html#section_3
Code: https://github.com/rabbitmq/rabbitmq-server/blob/rabbitmq_v3_5_3/src/rabbit_binary_parser.erl#L41