gadams00
gadams00

Reputation: 779

spring-cloud-stream request-reply messaging pattern

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.

Upvotes: 9

Views: 3366

Answers (1)

Gary Russell
Gary Russell

Reputation: 174554

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.

Upvotes: 7

Related Questions