Announcement Announcement Module
Collapse
No announcement yet.
Unable to simulate one consumer only using DefaultMessageListener Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to simulate one consumer only using DefaultMessageListener

    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>

  • #2
    Is your JMS version 1.1 or 1.02. If its 1.1, can you try with DefaultMessagListenerContainer instad of l01?

    Comment


    • #3
      THe JMS version what we are using is 1.02 and hence configured as DefaultMes sageListenerContainer102. One funny thing that we have noticed is that in weblogic 8.1 console, JMS queue monitoring is showing 4 as consumers high and total. I am not sure from where this number is coming up though the concurrentConsumers is set to 1 in the spring configuration file.

      Comment

      Working...
      X