spring-session icon indicating copy to clipboard operation
spring-session copied to clipboard

Default pool size for the Redis RedisMessageListenerContainer.taskExecutor

Open rolandgroen opened this issue 8 years ago • 3 comments

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 avatar Apr 15 '16 14:04 rolandgroen

@rolandgroen Thanks!

cc I believe you were interested in this too @tsachev

rwinch avatar Apr 15 '16 14:04 rwinch

@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.

tsachev avatar Apr 16 '16 19:04 tsachev

I would like contribute, Can someone mentor/help me here?

kunalvarpe avatar Mar 06 '23 17:03 kunalvarpe