Is there a request-reply pattern that one should use with spring-cloud-stream? All the documentation I can find on spring-cloud-stream is geared toward the MessageChannel.send fire-and-forget type of producer, and I'm familiar with @MessagingGateway from spring-integration, but I'm not sure how that would work with spring-cloud-stream. That would be useful when you have a REST POST endpoint that saves an entity with an assigned identifier and you need to return the assigned identifier to the caller, but you still want to use messaging.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There is not currently any notion of request/reply in spring cloud stream.
Consider it an analogy of a unix pipe foo | bar | baz
where each "application" or microservice takes some input and forwards it to the next element in the pipe.
Consider a stand-alone spring-boot app utilizing spring-integration for request/reply scenarios. Of course, that app can use s-c-s to do its work.