An application developer should use P2P messaging when every message must be successfully processed. Some of the characteristics of the P2P messaging model are as follows. Uses message queues, senders, and receivers. Queues retain all messages sent until such time as the messages are consumed or expire. Each message has only one consumer, though multiple receivers may connect to the queue.
Receivers acknowledge the successful receipt of a message.
In other words, it is feasible that all consumers will receive not all messages or no consumer will receive any message. Uses message topics, subscribers, and publishers. Messages are addressed to specific topics. Publishers and subscribers are usually anonymous. The system takes care of distributing the messages arriving from a topic's publishers to its subscribers.