处理所有消息后生成事件

发布于 2025-01-30 02:58:32 字数 144 浏览 2 评论 0 原文

在春季集成中是否有内置的方式,可以在上下文中处理所有消息时生成事件。例如,我有一个由 fileReadingMessageSource 拾取的文件,并且我们将所有行分开了,问候是在处理所有行或连接其他依赖性处理时发送警报。基本上可以连接后处理组件。

Is there a built in way in spring integration to generate an event when all messages has been processed in a context. For example, i have a file picked up by a FileReadingMessageSource and we split all rows in the file and the ask is to send an alert when all rows has been processed or connect some other dependent processing. Basically ability to wire a post processing component.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故笙诉离歌 2025-02-06 02:58:32

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 .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文