Hi,
I am new to Spring JMS. I used DefaultMessageListenerContainer with the following configuration
<bean id="listenerContainer" class="org.springframework.jms.listener.DefaultMes sageListenerContainer" depends-on="messageListener">
<property name="connectionFactory" ref="usageListenConnectionFactory" />
<property name="concurrentConsumers" value="5" />
<property name="receiveTimeout" value="300000" />
<property name="destination" ref="usageListenQueue" />
<property name="messageListener" ref="messageListener" />
</bean>
However this does not meet our requirement. We want the Container to poll for messages every 5 minutes. The value of 300000 works like this only if there are no messages on the queue. But if there are messages on the queue, it keeps retrieving them. Is there a Listener implementation by Spring that will wake up every 5 mins (or some other confiugurable interval) ignoring the load on the queue ?
If there is no such implementation, I am thinking of writing piece of logic using Quartz that will wake up every 5 mins and receive any messages synchronously. So I think I am asking about a configurable JMS Receiver bean, if any available in Spring.
Many many thanks
- atanum


Reply With Quote
