Announcement Announcement Module
Collapse
No announcement yet.
ApplicationEventListeningChannelAdapter - example Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ApplicationEventListeningChannelAdapter - example

    Hi,

    I want to provide a special route through an existing message flow with a separate inbound channel that is invoked programmatically. I have thought that a good approach could be to issue a spring ApplicationEvent signalling the start and then configuring a channel adapter that reacts to this event.

    In the SI documentation it states "To receive events and send them to a channel, simply define an instance of Spring Integration's
    ApplicationEventListeningChannelAdapter". However I cannot find an example of how to do this. Could someone provide me an example or some hints of how to configure such a channel adapter and how to configure the event types it should handle?

    Thanks an best regards,
    Armin

  • #2
    Its actually quite simple. All you need is to configure an ApplicationEventInboundChannelAdapter and start sending events to your application context. THey will be distributed to an outputChannel configured in the adapter

    Code:
    <int:channel id="outputChannel"/>
    <bean id="adapter" class="org.springframework.integration.event.ApplicationEventInboundChannelAdapter">
    	<property name="outputChannel" ref="outputChannel"/>
    </bean>
    For more details please look at the test cases: https://src.springsource.org/svn/spr...gration/event/

    Comment


    • #3
      Hi Oleg,

      thanks a lot, it works! Very simple indeed - if you know how to do it

      Comment


      • #4
        feel free to open 2 issues in JIRA:
        1) add namespace support for event adapters
        2) improve event adapter documentation

        Thanks,
        Mark

        Comment


        • #5
          http://jira.springframework.org/browse/INT-1220
          http://jira.springframework.org/browse/INT-1221

          Comment

          Working...
          X