Existing messaging systems(RabbitMQ/Kafka/Kinesis/SQS) can't guarantee the message consumption, however they can guarantee the message delivery.
However, a message consumption by a single consumer can be accomplished in the consumer code and positively acknowledging the message to RabbitMQ that the message is processed by a consumer. In case, there is validation error/external API call error or consumer exited with unknown error during processing, RabbitMQ redelivers the message with re-delivery flag in which case the consumer code should check for earlier message processing against a distributed Cache/DataBase and then take further action. This way, message consumption can be ensured once. All the messaging systems redeliver a message under various cases, hence its advisable to code for duplicate processing.
In your case 'single active consumer scenario, RabbitMQ re-delivers a messages to currently active consumer though you may have multiple instances of consumer running which are in a standby mode.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…