veegee / amqpy

Pure-Python 2 & 3 AMQP client library
http://amqpy.readthedocs.org/
Other
33 stars 5 forks source link

Support login methods other than AMQPLAIN #28

Closed ASzc closed 8 years ago

ASzc commented 8 years ago

There's an issue between amqpy and the Qpid Java Broker (which supports AMQP 0-9-1, unlike the Qpid C++ Broker, which only supports AMQP 0-10 or 1.0). Setting login_method to PLAIN just changes what amqpy advertises to the server, so it still sends an AMQPLAIN formatted SASL response, which (unsurprisingly) doesn't work.

This PR causes amqpy to actually change the response format when requested, or raise a KeyError if the specified login_method isn't supported.

veegee commented 8 years ago

This is good, I'll review, run tests and merge this in soon. Thanks!