py-amqp icon indicating copy to clipboard operation
py-amqp copied to clipboard

Fix and document return value of basic_consume

Open matusvalo opened this issue 6 years ago • 0 comments

Channel.basic_consume() now has 2 return values:

  • consumer_tag - when nowait == False
  • promise object wen nowait == True
  • ValueError() when nowait == True and user does not specify consumer_tag

This is confusing since the API is schizophrenic and returns two different values. Moreover promise object does not have any value to user of library.

I propose that consumer_tag is always returned except the case when ValueError() is raised

Also the return values are not documented.

matusvalo avatar Jan 14 '19 23:01 matusvalo