Announcement Announcement Module
Collapse
No announcement yet.
Messages redelivered without known cause Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Messages redelivered without known cause

    Hello,

    i am trying to configure simple MessageListener on Jboss Messaging Queue.
    My message listener just writes the content of the message.


    Here is my confiuguration.
    Code:
    <bean id="messageListener" class="com.my.test.JmsMessageListener" />
    
    <bean id="jmsJndiTemplate" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
    <props>
    <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
    <prop key="java.naming.provider.url">localhost:1099</prop>
    <prop key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop>
    <prop key="jnp.disableDiscovery">true</prop>
    </props>
    </property>
    </bean>
    
    <bean id="jmsConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiTemplate">
    <ref bean="jmsJndiTemplate" />
    </property>
    <property name="jndiName">
    <value>XAConnectionFactory</value>
    </property>
    </bean>
    
    
    <bean id="destination" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="queue/test1" />
    <property name="jndiTemplate" ref="jmsJndiTemplate" />
    </bean>
    
    
    <bean id="jmsContainer"
    class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    <property name="connectionFactory" ref="jmsConnectionFactory" />
    <property name="destination" ref="destination" />
    <property name="messageListener" ref="messageListener" />
    <property name="transactionManager" ref="txManager" />
    
    </bean>
    
    <bean id="txManager"
    class="org.springframework.transaction.jta.JtaTransactionManager" />
    </beans>

    It seems to work but there is a problem. I can see that half of messages are always in "ScheduledMessageCount" and listener have to wait for "RedeliveryDelay" set on a queue to perform those messages.
    I use JbossMessaging 1.4.6 with spring 3.1.

    Have you ever encountered such a problem?

    Best,
    Greg
    Last edited by Gregory; May 24th, 2012, 08:19 AM.
Working...
X