Java programming rabbitmq to realize message sending and receiving
Java implements ramqp, that is, advanced message queuing protocol. It is an open standard of application layer protocol and is designed for message oriented middleware. Message middleware is mainly used for decoupling between components. The sender of a message does not need to know the existence of the message consumer, and vice versa.
The main features of AMQP are message oriented, queue oriented, routing (including point-to-point and publish / subscribe), reliability and security.
Rabbitmq is an open source AMQP implementation. The server side is written in Erlang language and supports a variety of clients, such as python, ruby Net, Java, JMS, C, PHP, ActionScript, XMPP, stomp, etc. AJAX is supported. It is used to store and forward messages in distributed systems, and performs well in ease of use, scalability, high availability and so on.
This article does not introduce the knowledge of AMQP and rabbitmq. Please check it online
This paper is based on spring rabbit middleware to realize the function of sending and receiving messages
see http://www.rabbitmq.com/tutorials/tutorial-one-java.html
see http://www.springsource.org/spring-amqp
Please click here for the source code address