|
这个版本仍在开发中,尚未达到稳定状态。要使用最新稳定版,请使用 spring-cloud-stream 5.0.1 ! |
内容类型协商
Data transformation is one of the core features of any message-driven microservice architecture. Given that, in Spring Cloud Stream, such data is represented as a Spring Message, a message may have to be transformed to a desired shape or size before reaching its destination. This is required for two reasons:
-
转换传入消息的内容,使其符合应用程序提供的处理程序的签名。
-
将传出消息的内容转换为线路格式。
协议格式通常为byte[](这是Kafka和Rabbit绑定程序的默认值),但它受绑定程序实现的控制。
在Spring Cloud Stream中,消息转换是通过一个org.springframework.messaging.converter.MessageConverter来完成的。
| 微服推述中,spring 有写逻; spring mvc 是 spring 一部分,spring boot 是 springmvc 的一种曲线发射,spring cloud 是 spring boot 的一种服务 |