简体   繁体   中英

Can DirectChannel be used in Spring Integration with Project Reactor without blocking?

The documentation of Spring Integration specifies that in the context of FluxMessageChannel :

To achieve fully reactive behavior for the whole integration flow, such a channel must be placed between all the endpoints in the flow.

It makes me thinking whether it is also possible to use the DirectChannel when working with Reactive Streams, or can it cause any issues for the event loop?

It depends how blocking is a MessageHandler subscribed to that DirectChannel . Its purpose is to call a MessageHandler directly on a thread which has sent a message to this DirectChannel . So, if you do .map(e -> directChannel.send(e)) , you need to be sure that MessageHandler is not blocking.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM