camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edoardo Causarano <>
Subject Re: Losing mi sanity on pipeline testing
Date Thu, 27 Oct 2016 13:15:19 GMT

answers inline:

> On 27 Oct 2016, at 14:50, Brad Johnson <> wrote:
> Try putting in .log(${body}) in between each of the lines and see what you
> get. It appears you are using the SimpleDataSet which takes a single
> String.  What behavior are you expecting from ti?  Is it throwing an
> exception?  Have you tried sending in a List<String> with a ListDataSet to
> see what behavior it gives you?

I’m expecting the SimpleDataSet to provide 1 message body consisting of a List<DbxEntry>
(a list of items from a DropBox query.)
It’s throwing when trying to assert that the body correspond to the data provided by the
direct producer template (I only figured that out after step debugging, is this the intended

> Is there a specific reason you are using a .pipeline() call explicitly?  I
> believe that's the default behavior.  The only reason I can think of
> explicitly using it is when you just want to use it as a short hand for
> routing as shown in the Camel documentation. You don't have to chain a
> bunch of to() method calls then.

Because I’d like to broadcast a timer trigger to a couple pipelines consisting of remote
API getters and transformers. Otherwise all stages - including the transformers - would be
directly wired to the timer and that would make no sense. 

timer -->  pipeline(dropbox, transformer) --> doStuff
	 |->  pipeline(google, transformer)   --|   

> from("direct:a").pipeline("direct:x", "direct:y", "direct:z",
> "mock:result");
> On Thu, Oct 27, 2016 at 7:03 AM, Edoardo Causarano <
>> wrote:
>> Hi all,
>> I’m trying to do something relatively simple, yet it’s been eluding me for
>> hours already!
>> I’d like to have a timer trigger a broadcast to a couple pipelines to
>> invoke a remote cloud component, transform the responses to a common type
>> and merge the results in one homogenous list to further process.
>> It’s been a nightmare so far and even testing is proving to be nigh
>> impossible, even this simple setup is failing with a :
>> @Override
>> protected RouteBuilder createRouteBuilder() {
>>    return new RouteBuilder() {
>>        @Override
>>        public void configure() throws Exception {
>>            from("direct:start").pipeline()
>>                    .to("dataset:source")
>>                    .to("dropBoxTranslator")
>>                    .end()
>>                .to("mock:result");
>>        }
>>    };
>> }
>> Seems that the dataset endpoint tries to assert that its’ own output equal
>> the dummy string I sent from the direct:start producer to execute an
>> exchange (in org.apache.camel.component.dataset.DataSetSupport#assertMessageExpected).
>> What on earth is going on?!
>> Best,
>> Edoardo

View raw message