Read stream from input channel

人走茶凉 提交于 2019-12-12 23:13:09

问题


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.

来源:https://stackoverflow.com/questions/41821377/read-stream-from-input-channel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!