Read stream from input channel

2019-07-24 15:17发布

问题:

it is possible to read the stream from an input channel without creating a new function and add the streamListenner annotation. I'm using spring cloud stream.

Thanks!

EDIT

Actually, I'm creating a microservice, where I have this method

@RequestMapping(method = RequestMethod.POST, value = "/annonces")
public void addAnnonce(@RequestBody AnnonceWrapper annonceWrapper) {
    final Message<AnnonceWrapper> message = MessageBuilder
                                                    .withPayload(annonceWrapper)
                                                    .setReplyChannel(messageStream.addAnnonceInput())
                                                    .build();
    this.messageStream.addAnnonceOutput().send(message);
}

This method should receive from the subscribe channel addAnnonceInput() the json that will be returned by the current function. the probleme is how i can read the stream from the addAnnonceInput() channel.