1, in most applications, to enhance the system can communicate by asynchronous messaging middleware service, expanded decoupling ability.
2, message service in two important concepts:
message broker (message broker) and destination (destination) When the message sender to send a message, the message will take over the agency, the Message Agent to ensure message delivery to a specified destination.
3, message queues, there are two forms of destinations:
queues (queue): peer messaging (point-to-point)
theme (topic): publishing (publish) / subscribe (subscribe) messaging
4, point to point:
news the sender sends a message, the message broker put it in a queue, the message recipient gets the message content from the queue after the message is read out of the queue;
the message has only one sender and receiver, but does not mean that there can be only a recipient.
5, publish subscribe:
sender (publisher) sends a message to the topic, multiple recipients (subscribers) listening (subscribe to) this theme, you will receive a message at the same time when a message arrives.
6, JMS (Java Message Service) JAVA Message Service: specification JVM-based message broker. ActiveMQ, HornetMQ is JMS implementation.
7, AMQP (Advanced Message Queuing Protocol ): Advanced Message Queuing Protocol, is a message broker specification-compliant JMS; RabbitMQ AMQP of achieving.
8, Spring support:
Spring-JMS provides support for the JMS;
Spring-Rabbit provides support for AMQP; the
need to implement ConnectionFactory connection message to the proxy;
Provide JmsTemplate, RabbitTemplate to send a message;
@JmsListener (JMS), @ RabbitListener (AMQP) message broker comment listens for messages posted on the method;
@ EnableJms, @ EnableRabbit open support.
9, Spring Boot autoconfiguration:
JmsAutoConfiguration
RabbitAutoConfiguration
SpringBoot series of two-six: Message Queue
Guess you like
Origin blog.csdn.net/lizhiqiang1217/article/details/92076789
Recommended
Ranking