Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 285
gadams00 Avatar asked Mar 06 '16 23:03

gadams00


1 Answers

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.

like image 189
Gary Russell Avatar answered Nov 07 '22 16:11

Gary Russell