Reputation: 4719
If a Spring Integration channel is defined with a task executor, a thread pool will be used to handle messages as they come in. If a service activator or transformer endpoint component receives messages from this internal channel, will a pool of endpoint components be instantiated, one for each thread? If this is not the default behaviour, what configuration is required in order to achieve this?
This is important for two reasons:
So that the service activator/transformer which receives the messages will not be a bottleneck.
To ensure that the endpoint component handles messages in the same thread that the internal channel uses, so they are part of the same transaction. If this is the case and the channel is persisted using JMS, messages will not be lost. Otherwise, if the endpoint run in a separate transaction, the fact that the messages are persited on the channel will not help if there is a JVM failure once a message has been passed to the endpoint component.
Thanks
Upvotes: 1
Views: 770
Reputation: 174484
No; there is one instance of each endpoint, regardless of the threading on in the input channel.
Perhaps if you can describe a specific use case / configuration, someone can provide some suggestions.
Upvotes: 1