I have a requirement where in only one consumer is required to process messages on JMS queue. Message listener configuration is as shown below. With this configuration I am unable to simulate one consumer only scenario where in multiple messages posted simulteneously are picked up by different consumers. The version of spring I am using is 2.0.8. Please let me know where I have gone wrong with this configuration.
<bean id="jmsContainer"
class="org.springframework.jms.listener.DefaultMes sageListenerContainer102">
<property name="connectionFactory"
ref="jmsQueueConnectionFactory" />
<property name="destination" ref="queue" />
<property name="messageListener" ref="messageListener" />
<property name="transactionManager" ref="transactionManager"/>
<property name="sessionTransacted" value="true"/>
<property name="concurrentConsumers" value="1"/>
<property name="maxConcurrentConsumers" value="1"/>
<property name="maxMessagesPerTask" value="1"/>
<property name="taskExecutor">
<bean id="timerTaskExecutor" class="org.springframework.scheduling.timer.TimerT askExecutor">
<property name="delay" value="10000"/>
</bean>
</property>
</bean>


Reply With Quote