我需要使用事件驱动机制。使用ApplicationEventPublisher
. 我想在到达侦听此事件的端点之前为消息设置延迟。有这样的方法吗?找到https://docs.spring.io/spring-integration/docs/2.0.0.RC1/reference/html/delayer.html但不确定它应该如何与 ApplicationEventPublisher 集成。
有没有一种简单的方法可以使用spring来实现上述目的?
除了Delayer
,Spring Integration 还为ApplicationEventPublishingMessageHandler
生产者提供ApplicationEvent
了ApplicationEventPublisher
基于传入消息的 。通过这种方式,您确实会延迟 中的消息(事件)<delayer>
,然后通过<int-event:outbound-channel-adapter>
.
还可以考虑使用尽可能晚的 Spring Integration 版本:https : //projects.spring.io/spring-integration/
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句