php-amqplib
php-amqplib copied to clipboard
AMQPChannel::basic_cancel should have a defined or definable behavior about timing issues
Currently any basic_deliver messages received after a call to basic_cancel but before receiving basic_cancel_ok are queued, and then discarded without ack till the connection is closed.
Couple possible solutions:
- basic_cancel could reject basic_deliver messages for the cancelled consumer
- basic_cancel could continue processing basic_deliver messages for the canceled consumer till basic_cancel_ok is received. Could be done simply by adding "60,60" to the wait list in basic_cancel
- basic_cancel could have a mid-cancel callback option
- AMQPChannel could have an option for a fall-back callback option.