处理所有消息后生成事件
在春季集成中是否有内置的方式,可以在上下文中处理所有消息时生成事件。例如,我有一个由 fileReadingMessageSource
拾取的文件,并且我们将所有行分开了,问候是在处理所有行或连接其他依赖性处理时发送警报。基本上可以连接后处理组件。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Filesplitter
具有发射启动和结束文件标记的能力。您可以分别路由它们,并将所需的终端消息转到事件。也有各自的活动发布者频道适配器。有关更多信息,请参见文档:
https://docs.spring.io/spring-integration/spring-integration/docs/docs/current/current/current/referent/referent/reference/reference/html/message -Routing.html#Messaging-routing-chapter
https://docs.spring.io/spring-integration/docs/current/current/referent/referent/html/html/event.html#applicationevent
一般来说:没有内置的功能来确定该功能消息的结尾流。这只是一个无限的流。大多数消息彼此不知道,也不会彼此影响。只有特定的任务和特定的业务消息才能具有这样的指标。因此,您分享了该文件分配是很好的。其他用例可能不会带有最终标记消息。
The
FileSplitter
has an ability to emit start and end file markers. You can route them respectively and turn desired end message to the event. There is respective event publisher channel adapter , too.See docs for more info:
https://docs.spring.io/spring-integration/docs/current/reference/html/file.html#file-splitter
https://docs.spring.io/spring-integration/docs/current/reference/html/message-routing.html#messaging-routing-chapter
https://docs.spring.io/spring-integration/docs/current/reference/html/event.html#applicationevent
As a general note: there is no built-in feature to determine the end of the messages flow. It is just an infinite stream. And mostly messages are not aware of each other and don’t affect each other. Only particular task and specific business message can have such an indicator. Therefore it is good that you have shared that file splitting. Other use-cases might not come with end marker message .