Announcement Announcement Module
Collapse
No announcement yet.
Using JMS Message Selector inside Container configuration to talk to JMS. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using JMS Message Selector inside Container configuration to talk to JMS.

    Following is the container configuration:

    Code:
        <bean id="common.durableListenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer"
                abstract="true">
            <property name="connectionFactory" ref="common.topicConnectionFactory"/>
            <property name="clientId" value="${jms.durable.clientid}"/>
            <property name="subscriptionDurable" value="true"/>
            <property name="pubSubDomain" value="true"/>
            <property name="sessionTransacted" value="true"/>
        </bean>    
    
        <bean id="requestTopicContainer" parent="common.durableListenerContainer">
    		<property name="destination" ref="common.requestTopic" />
    		<property name="messageSelector" value="exchangeId = 'CME'"/>
    		<property name="durableSubscriptionName" value="${jms.durable.requesttopic}"/>
    	</bean>	 
    
    
        <!-- Read messages off this JMS channel, convert to MasterTransferObjects, drop onto pre-validation channel -->
        <jms:message-driven-channel-adapter id="requestChannelAdapter"
                                            container="requestTopicContainer"
                                            message-converter="messageConverter"
                                            channel="request"
                                            
                                            />
    
    
    I am getting the following error:
    
    
    listener.DefaultMessageListenerContainer - Setup of JMS message listener invoker failed for destination 'Topic[dev.request]' - trying to recover. Cause: Attributes differed from configured durable
    2010-03-11 14:38:49,120 INFO  [requestTopicContainer-1] listener.DefaultMessageListenerContainer - Successfully refreshed JMS Connection
    2010-03-11 14:38:54,433 INFO  [requestTopicContainer-2] listener.DefaultMessageListenerContainer - Setup of JMS message listener invoker failed for destination 'Topic[dev.request]' - trying to recover. Cause: Attributes differed from configured durable.
    Please suggest.

  • #2
    Invalid Logical Operation.

    <property name="messageSelector" value='selector_by_id = 13 and 14'></property>

    It is giving me invalid Logical operation.

    If I put only one, it is working fine. But I want two. Please suggest

    <property name="messageSelector" value='selector_by_exchange_id = 13'></property>

    Comment


    • #3
      Got it.

      This one worked.
      <property name="messageSelector" value='selector_by_id = 13 and selector_by_id = 14'></property>

      Comment

      Working...
      X