0
votes

I want to test camel spring integration example from the apache camel site http://camel.apache.org/springintegration.html but I am getting the exception org.apache.camel.RuntimeCamelException: org.springframework.integration.MessageDeliveryException: Dispatcher has no subscribers for channel outputchannel.

my short code is given below:

<channel id="inChannel"/>
<channel id="outputChannel"/>

<beans:bean id="greeting" class="com.javarticles.spring.integration.Greeting"/>

<service-activator input-channel="inChannel" ref="greeting"   method="sayHello" output-channel="outputChannel"/>

<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
    <route>
        <from uri="activemq:activemqsource"/>
        <to uri="log:input"/>
        <to uri="spring-integration:inChannel? inputChannel=outputChannel"/>
        <to uri="log:output"/>
    </route>


I tried to search related problems but I did not get with camel could any one tell me how to subscribe the outputchannel

1

1 Answers

0
votes

According to the Camel documentation mentioned by you, the config should be like this:

 <to uri="spring-integration:inputChannel?inOut=true&amp;inputChannel=outputChannel"/>

Your issue is inOut=true:

The exchange pattern that the Spring integration endpoint should use. If inOut=true then a reply channel is expected, either from the Spring Integration Message header or configured on the endpoint.