Parsed documentation:
View on GitHub
Registers a queue consumer process. The `pid` of the process can be set using
the `consumer_pid` argument and defaults to the calling process.

The consumer process will receive the following data structures:

  * `{:basic_deliver, payload, meta}` - This is sent for each message consumed, where `payload` contains the message content and `meta` contains all the metadata set when sending with Basic.publish or additional info set by the broker;
  * `{:basic_consume_ok, %{consumer_tag: consumer_tag}}` - Sent when the consumer process is registered with Basic.consume. The caller receives the same information as the return of Basic.consume;
  * `{:basic_cancel, %{consumer_tag: consumer_tag, no_wait: no_wait}}` - Sent by the broker when the consumer is unexpectedly cancelled (such as after a queue deletion)
  * `{:basic_cancel_ok, %{consumer_tag: consumer_tag}}` - Sent to the consumer process after a call to Basic.cancel
Please help! Open an issue on GitHub if this assessment is incorrect.