Results 1 to 2 of 2

Thread: doubt in outbound adapter

  1. #1
    Join Date
    Jun 2010
    Posts
    13

    Default doubt in outbound adapter

    i have a out bound adapter, as

    <si:outbound-channel-adapter
    channel="CHANNEL6"
    ref="queueConsumer"
    method="processMessage"/>

    am not using channel6 any where in that xml file.

    when i try executing it , i get the following error,
    used by: java.lang.IllegalArgumentException: no such input channel 'CHANNEL6' for endpoint 'org.springframework.integration.config.ConsumerEn dpointFactoryBean#0'
    at org.springframework.util.Assert.isTrue(Assert.java :65)
    at org.springframework.integration.config.ConsumerEnd pointFactoryBean.initializeEndpoint(ConsumerEndpoi ntFactoryBean.java:125)
    at org.springframework.integration.config.ConsumerEnd pointFactoryBean.afterPropertiesSet(ConsumerEndpoi ntFactoryBean.java:98)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1369)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1335)
    ... 16 more




    Can we have some lazy-init type of thing where we can avoid this error. i tried using auto-startup but it was of no use.
    Also, please explain what exactly is auto-startup


    Thanks,
    Radha

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    am not using channel6 any where in that xml file.
    You are using it, by declaring this:
    Code:
    <si:outbound-channel-adapter 
                  channel="CHANNEL6"
                  ref="queueConsumer" 
                  method="processMessage"/>
    The consumer that you declared above is built by ConsumerEndpointFactoryBean and this bean has to decide what type of consumer to create (pollable of event driven). It can only make that decision if it knows what type of channel this component is bound too. For example, if CHANNEL6 was a Queue channel, then it would end up to be a Pollable consumer, but if CHANNEL6 is Direct channel, then it would be Event driven.
    Without channel present this factory bean can't determine what consumer to build.
    As for the auto-startup which is 'true' by default you essentially control when a consumer attaches (subscribes/unsubscribes) itself to a channel to retrieve messages. Look at this as a way of starting or stopping a MessageListener.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •