Messaging queues and topics are the mechanisms by which messages are delivered from one point to another. They act as the staging area for messages. Messages are pushed onto a queue or topic and wait for the consumer to consume them.
The queue is used in the point-to-point messaging model, where the message is produced by the producer and received by a single consumer. The topic is used in the publish-subscribe messaging model, where the message is published by a publisher to a topic and is then consumed by multiple subscribers that are listening on that topic.