There are several types of exchanges in AMQP protocol
- fanout - messages are published to all queues
- direct - messages are delivered if the message's routing key is identical to the queue's binding key.
- topic - The exchange routes messages to the relevant queue or queues, depending on matches between the routing and binding keys
- header - headers of the messages, and the binding key constraints of the queues are used to determine the correct queue/queues
A good article about the above is explained in detail in the following article.
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_MRG/1.3/html/Messaging_User_Guide/chap-Messaging_User_Guide-Exchanges.html
An article that describes on how to use rabbitmq using java is metion below
An article that describes on how to use rabbitmq using java is metion below