spring-projects / spring-integration

Spring Integration provides an extension of the Spring programming model to support the well-known Enterprise Integration Patterns (EIP)
http://projects.spring.io/spring-integration/
Apache License 2.0
1.54k stars 1.1k forks source link

Default to non blocking JMS receive for JMS inbound channel adapter [INT-1795] #5740

Closed spring-operator closed 13 years ago

spring-operator commented 13 years ago

Jonas Partner opened INT-1795 and commented

This improvement relates to #5782. While the receive-timeout makes a sensible setup easier I feel strongly that a default of -1 (dont block on receive) should be set for the inbound channel adapter. Two main reasons for this. Firstly I don't think a component designed for polling should block by default since this will confuse people. Most people would expect the below to check JMS daily at midnight but in fact we block until a message is received any time of day. This means the behaviour is very similar to the message driven JMS equivalent.

<jms:in ...> \ </jms:in>

Secondly where this default behaviour is not understood the application will behave in a non intuitive way. For example an application that should be polling 100 queues every twenty seconds using ten threads will in fact block up all available threads on the first ten queues and will then be unable to execute other scheduled tasks.


Affects: 2.0.1, 2.0.2

spring-operator commented 13 years ago

Mark Fisher commented

Good explanation. I agree. Setting a 2.0.4 target.