Ecotonedoes allow for easy change endpoint to be running synchronously or asynchronously according to current running process.
endpointIdon our endpoint's annotation, in this case in
Asynchronoushas channel name defined as
orderswe need to register such channel. In order to do it, we need to use one of the Modules, that provides pollable channels. At this moment following modules with pollable channels are available:
handledMessageLimit- Amount of messages to be handled before stopping consumer
executionTimeLimit- How long consumer should run before stopping (milliseconds)
memoryLimit- How much memory can be consumed by before stopping consumer (Megabytes)
stopOnFailure- Stop consumer in case of exception
Asynchronouson the class, level so all the endpoints within a class will becomes asynchronous.
Ecotone\Messaging\Attribute\AsynchronousRunningEndpointIf you want to intercept all polling endpoints you should make use of annotation related point cut on this.
null channelwhich means it will drop the any message it receive. This can be useful in testing scenarios, if we want to turn off specific functionality.
Ecotonecomes with solution that allow to
retry failed messagesand push them to
error channelfor later investigation.