Spring JMS 和 Spring 消息传递有什么区别?

What is the difference between Spring JMS and Spring Messaging?

有两个库:spring-messaging 和 spring-jms。它们都有相似之处类:MarshallingMessageConverter、MarshallingMessageConverter 等

为什么我们需要这些类似的库?

两者不相似。 spring-messaging 是一组用于目标实现的消息传递组件。 JMS 就是其中之一。另一个是 WebSocket。 Spring 集成:https://spring.io/projects/spring-integration. It's just coincident that those classes are named similar. However they are in different packages and serve the same purpose - deal with an XML payload. Although the last one is really specific to only JMS. You may find similar name for classes specific to AMQP protocol in Spring AMQP project: https://spring.io/projects/spring-amqp which is also based on the mentioned spring-messaging API. And there are more like Spring for Apache Kafka: https://spring.io/projects/spring-kafka. Spring Cloud Stream also uses some of that messaging API: https://spring.io/projects/spring-cloud-stream 中有关消息的更多信息。因此,Spring JMS 只是应用 Spring 消息传递概念的示例之一。