spring-session
spring-session copied to clipboard
Default pool size for the Redis RedisMessageListenerContainer.taskExecutor
The RedisMessageListenerContainer uses a SimpleAsyncTaskExecutor to dispatch the messages. This causes problems regarding thread creation and repletion, see issue https://github.com/spring-projects/spring-session/issues/483.
It makes sense to make spring-session inject a Pooled TaskExecutor into spring-data-redis. We use a pool size of 10.
@rolandgroen Thanks!
cc I believe you were interested in this too @tsachev
@rwinch Yes I opened #314 some time ago and after a discussion we agreed to leave SimpleAsyncTaskExecutor
as default and provide an extension point for the executors. This was implemented in PR #374.
I agree that SimpleAsyncTaskExecutor
is terrible default in case of spring-session
.
In my project I think we use something like the one configured in this test
https://github.com/spring-projects/spring-session/blob/master/spring-session/src/integration-test/java/org/springframework/session/data/redis/taskexecutor/RedisListenerContainerTaskExecutorITests.java#L100
I.e. single thread executor for events and the SimpleAsyncTaskExecutor
for the subscription.
I would like contribute, Can someone mentor/help me here?