Hi,

I know this is not an official Camel component but is it possible to do request/reply with the Camel Spring AMQP component ?
I don't see any example on the internet.

Basically here's my context :

    <!-- Beans and Rabbit MQ Configuration here ... -->

    <camelContext xmlns="http://camel.apache.org/schema/spring";>
        <route>
            <from uri="file:src/data?noop=true"/>
            <to uri="direct:beforeRabbit"/>
        </route>
        <route>
            <from uri="direct:beforeRabbit"/>
            <log message="Sending to RabbitMQ"/>
<to uri="spring-amqp:mytest:myQueue:testKey?exchangePattern=InOut&amp;durable=true&amp;autodelete=false"/>
            <bean ref="outBean" method="process"/>
        </route>
        <route>
<from uri="spring-amqp:mytest:myQueue:testKey?durable=true&amp;autodelete=false"/>
            <bean ref="processBean" method="process"/>
        </route>
    </camelContext>


And the beans :

public class OutBean {

    public void process(@Body String message) {
        System.out.println(message);
    }
}

public class ProcessBean {

    public String process() {
        return "Process completed";
    }
}


What I'm trying to do - this is a proof-of-concept - is to send the file through RabbitMQ and then get a response "Process completed" from the ProcessBean which is then displayed by the OutBean.

This isn't working. What is displayed is the body of the file, not the String "Process completed".

Am I doing something wrong ?

Thanks.
--
Bruno Dusausoy
Software engineer
YP5 Software
--
Pensez environnement : limitez l'impression de ce mail.
Please don't print this e-mail unless you really need to.

Reply via email to