camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "liugang" <>
Subject RE: Multiple Endpoint URLs defined at one component
Date Tue, 15 Jan 2013 02:26:28 GMT
Hi Christian:

I'm not sure it's the same meaning: one is a single string; one is multiple

But anyway, thanks for your response.


-----Original Message-----
From: Christian Müller [] 
Sent: Tuesday, January 15, 2013 6:13 AM
Subject: Re: Multiple Endpoint URLs defined at one component

Why you didn't try it out? It's so simple:

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;

public class CamelMultipleEndpointsTest extends CamelTestSupport {

    public void test() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:end");
        mock.expectedBodiesReceived("a", "b", "c", "d");

        context.addRoutes(new RouteBuilder() {
            public void configure() {
                from("direct:a", "direct:b", "direct:c", "direct:d")

        template.sendBody("direct:a", "a");
        template.sendBody("direct:b", "b");
        template.sendBody("direct:c", "c");
        template.sendBody("direct:d", "d");


And yes, it's possible (with a slightly different syntax).


On Mon, Jan 14, 2013 at 9:59 AM, liugang <> wrote:

> Hi All:
> I'd like to know it's there any Camel component which support to define
> multiple consumer(provider?) endpoint urls in it? For example:
>         from("XXX:direct:a, direct:b,
> in this case, the "from" can handle the massage no matter it sends to
> "direct:a", "direct:b", "direct:c" or "jms:queue:a".
> Thanks
> GangLiu


View raw message