Endpoint with Content-based Route does not create consumer

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Endpoint with Content-based Route does not create consumer

Bruno Borges
In the following Java DSL route, the Endpoint we are developing does not
create a consumer.

                from("file:/home/bruno/odette/
outbox")
                .to(oftpToUrl)
                    .choice()

.when(header(OdetteEndpoint.ODETTE_DELIVERY_NOTIFICATION).isNotNull())
                            .to("bean:incomingEERP")
                        .otherwise()
                            .to("file:/home/bruno/odette/inbox");

It seems this could be fixed by simply adding a .to("direct:a"); after
oftpToUrl and then a from("direct:a"). before .choise(), splitting this
route in two.

But I want to know if is this the right procedure.

Thanks,

Bruno Borges
www.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
 - Francois de La Rochefoucauld
Reply | Threaded
Open this post in threaded view
|

Re: Endpoint with Content-based Route does not create consumer

Bruno Borges
Isn't the endpoint associated to "oftpToUrl" supposed to createConsumer for
this route?


Cheers,
Bruno Borges
www.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
 - Francois de La Rochefoucauld



On Tue, Sep 21, 2010 at 1:42 PM, Bruno Borges <[hidden email]>wrote:

> In the following Java DSL route, the Endpoint we are developing does not
> create a consumer.
>
>                 from("file:/home/bruno/odette/
> outbox")
>                 .to(oftpToUrl)
>                     .choice()
>
> .when(header(OdetteEndpoint.ODETTE_DELIVERY_NOTIFICATION).isNotNull())
>                             .to("bean:incomingEERP")
>                         .otherwise()
>                             .to("file:/home/bruno/odette/inbox");
>
> It seems this could be fixed by simply adding a .to("direct:a"); after
> oftpToUrl and then a from("direct:a"). before .choise(), splitting this
> route in two.
>
> But I want to know if is this the right procedure.
>
> Thanks,
>
> Bruno Borges
> www.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
>  - Francois de La Rochefoucauld
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Endpoint with Content-based Route does not create consumer

Claus Ibsen-2
On Tue, Sep 21, 2010 at 7:04 PM, Bruno Borges <[hidden email]> wrote:
> Isn't the endpoint associated to "oftpToUrl" supposed to createConsumer for
> this route?
>

You have
 .to(oftpToUrl)
which means its a producer


>
> Cheers,
> Bruno Borges
> www.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
>  - Francois de La Rochefoucauld
>
>
>
> On Tue, Sep 21, 2010 at 1:42 PM, Bruno Borges <[hidden email]>wrote:
>
>> In the following Java DSL route, the Endpoint we are developing does not
>> create a consumer.
>>
>>                 from("file:/home/bruno/odette/
>> outbox")
>>                 .to(oftpToUrl)
>>                     .choice()
>>
>> .when(header(OdetteEndpoint.ODETTE_DELIVERY_NOTIFICATION).isNotNull())
>>                             .to("bean:incomingEERP")
>>                         .otherwise()
>>                             .to("file:/home/bruno/odette/inbox");
>>
>> It seems this could be fixed by simply adding a .to("direct:a"); after
>> oftpToUrl and then a from("direct:a"). before .choise(), splitting this
>> route in two.
>>
>> But I want to know if is this the right procedure.
>>
>> Thanks,
>>
>> Bruno Borges
>> www.brunoborges.com.br
>> +55 21 76727099
>>
>> "The glory of great men should always be
>> measured by the means they have used to
>> acquire it."
>>  - Francois de La Rochefoucauld
>>
>>
>



--
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus