Hi all
Am trying to use a dynamic RecipientList in apache camel, and my router bean
is as follows.


public class RouterBean{
    private final static Logger logger = Logger.getLogger(RouterBean.class);

    @Consume(uri = "activemq:myTopic.input")
    @RecipientList
    public String[] route(String msg) {

logger.info("Message:"  +msg);
        return new String[]{"activemq:myTopic.output};
    }
}

Also, in the camel context have associated a class that extends
RouterBuilder and it overrides the configure() as follows

public void configure() {
from(SERVICE_IN).recipientList(header("foo")).bean(RouterBean.class,
"route");
        }

Am posting a xml message to myTopic.input from a a stand alone application,
and the message is received in the route method in the RouterBean. How do i
send it to the output queue of my interest, say for example i just wanna
pass the same msg to myTopic.output

Any help would be of great use.

Also, kindly let me know how to filter the messages based on the information
in the xml message

Regards
Nivi

Reply via email to