Announcement Announcement Module
No announcement yet.
How to configure ErrorChannel for a MessageListener? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to configure ErrorChannel for a MessageListener?

    Hi Folks,
    My requirement is to configure error channel for a messageListener.
    If any exception raised in onMessage method the flow should go via errorChannel. I will configure some service activator for error channel and i will handle the exception there.

    My sample code for messageListener is::
    <bean id="msgListenerContainer" class="org.springframework.jms.listener.DefaultMes sageListenerContainer">
    <property name="connectionFactory" ref="jmsFactory"/>
    <property name="transactionManager" ref="transactionManager"/>
    <property name="destination" ref="myQueue"/>
    <property name="messageListener" ref="messageConsumer" />
    <property name="cacheLevelName" value="CACHE_CONSUMER"/>

    Can any one please give some suggestions on this?.

    Thanks in Advance,
    Mohan Reddy M

  • #2
    I think, you didn't understand the configuration of JMS support in SI.
    The error-channel is set on jms:message-driven-channel-adapter
    and then you may configure an error handler as you described.
    Please read

    Good luck
    Artem Bilan