Now switch to the bottom left terminal window and stop the receiver by selecting CTRL + C.
Switch back to the ActiveMQ “Queues” window and refresh the window. You will notice that the “Number of Pending Messages” and the “Messages Enqueued” are increasing, while the number of “Messages Dequeued” is static. This is the behavior when there is a sender but no receiver.
Click on workshop.queueA to see the contents of that queue.
Make a note of the message ID of oldest message in the queue.
Now, as before, scroll to the top of your brokers details page and click on Actions -> Reboot broker, and then select reboot.
After a short while, the currently active Active MQ broker will become inaccessible, switch to the broker tab and you will notice this.
Return to the Amazon MQ Broker broker details page (below) and follow the link to the originally Active MQ broker, this is now the active broker.
Log into the console using the username workshopUser, and the password you set before.
Select “Queues” and notice that the “Number of Pending Messages” and the “Messages Enqueued” are increasing, while the number of “Messages Dequeued” is static.
Click on workshop.queueA to see the stored messages. You will notice that the message at the top of the queue, or the oldest message, is the same as the one you saw before.
This shows that no messages were lost when we failed over from the Active broker to the Standby broker.