agoragames / haigha

AMQP Python client
BSD 3-Clause "New" or "Revised" License
160 stars 41 forks source link

basic.consume doesn't return consumer_tag, so how to get it? #71

Open vitaly-krugl opened 9 years ago

vitaly-krugl commented 9 years ago

Presently, there appears to be no mechanism to retrieve the generated consumer_tag when calling channel.basic.consume(...).

Basic.consume should return the generated consumer_tag so it may be used by the application.

Also, in the event that consumer_tag was neither supplied nor generated, the completion callback invoked by Basic._recv_consume_ok should pass the broker-generated consumer_tag to the completion callback as an arg.

vitaly-krugl commented 8 years ago

Perhaps, it would be better to make public Basic's routine for generating the tags, so that users that need the tag could use an existing routine rather than having to implement their own.