C# – RabbitMQ – Doubts about RabbitMQ Methods

RabbitMQ is meesage queue which is based on publisher and consumer. So

"channel.BasicAck" is used to send acknowledgement.

API methods used for delivery acknowledgement are usually exposed as operations on a channel in client libraries. Java client users will use Channel#basicAck and Channel#basicNack to perform a basic.ack and basic.nack, respectively.
MoreDetail

If Not use Basicack then Messages will be redelivered when your client quits (which may look like random redelivery), but RabbitMQ will eat more and more memory as it won’t be able to release any unacked messages.
More Details

"_channel.BasicConsume" is used to recieve message as consumer and do needful operation on queue as consumer.

For more detail, Please refer the above links.

Read more here: Source link