Previously, consumer would get destroyed after cancel() call and recreated on start() on a rmqamqp::ReceiveChannel. The reasoning behind that change is that current consumer lifecycle is not complete, i.e. NOT_CONSUMING->STARTING->CONSUMING->CANCELLING->CANCELLED->X. Since we are adding resume() function, we had to store the previous state of the consumer before cancelling. To simplify this, we decided to not destroy the consumer. Also, in current design we have only single consumer per channel, so we were thinking of merging channel and consumer states.
Proposed changes
Consumer does not get destroyed after calling cancel() function, but will be in a CANCELLED state. State will be changed to NOT_CONSUMING upon channel reset.
Problem statement
Previously, consumer would get destroyed after cancel() call and recreated on start() on a rmqamqp::ReceiveChannel. The reasoning behind that change is that current consumer lifecycle is not complete, i.e. NOT_CONSUMING->STARTING->CONSUMING->CANCELLING->CANCELLED->X. Since we are adding resume() function, we had to store the previous state of the consumer before cancelling. To simplify this, we decided to not destroy the consumer. Also, in current design we have only single consumer per channel, so we were thinking of merging channel and consumer states.
Proposed changes
Consumer does not get destroyed after calling cancel() function, but will be in a CANCELLED state. State will be changed to NOT_CONSUMING upon channel reset.