Hi,
I already post it in
rabbitmq-discuss maillist, repost in this office mail list again. Sorry for any inconvenience.
I am a newbie to learn
rabbitmq tutorials, for subscribe method I have a doubt, need help for clarify. Thanks for advance.
The tutorials code will wait for #basic.consume_ok after sending subscribe request, but for
erlang-client-user-guideThe
consumer argument is the pid of a process to which the client library
will deliver messages. This can be an arbitrary Erlang process,
including the process that initiated the subscription. The
#'basic.consume_ok'{} notification contains a tag that identifies the
subscription. This is used at a later point in time to cancel the
subscription. This notification is sent both to the process that
created the subscription (as the return value to
amqp_channel:subscribe/3) and as a message to the consumer process.
The #basi_consume_ok will return twice, one for process that created the subscription, another for consumer process.
So
for the tutorials, process created the subscription and consumer
process are same, should it still wait for #basic.consume_ok in receiver
statement? Since subscribe method already returned the notification.
Thanks,
Linbo