Two Publishers Two Subscribers

In this step, you will send messages from two senders to the same topic. Select the top right terminal and run the following command to start a second sender. This is the same as the previous command with a different name to distinguish the senders.

java -jar ./bin/amazon-mq-client.jar -url $url -mode sender -type topic -destination demo.topicA -name Sender-2

Now you can see that multiple senders can send messages to the same topic and multiple receivers can receive messages from the same topic. All the messages sent to the topic, from any sender, are delivered to all receivers.

Try stopping and starting various combinations of senders and receivers, and make sure you understand the concept of topics.