Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring integration - multi inbound adapters not working

In my project I use 9 (nine) int-ip:udp-inbound-channel-adapter's and one jms:inbound-channel-adapter. Jms adapters receives messages from server. Everything worked fine, but when i added another (10th) int-ip:udp-inbound-channel-adapter jms stopped received any messages. When i removed randomly one of udp-adapters jms arrived. I use openMq. There is no errors or exceptions. Whats wrong?

Thanks

like image 317
Marek Wargocki Avatar asked Oct 22 '22 17:10

Marek Wargocki


1 Answers

The default taskScheduler bean has a pool of 10 threads. Each UDP adapter uses one of these threads to receive packets.

Simply define an explicit scheduler with that name with a larger pool size

<task:scheduler id="taskScheduler" pool-size="20"/>
like image 63
Gary Russell Avatar answered Oct 27 '22 11:10

Gary Russell