Hi Henryk

> Are you sure? :) Exchange properties are propagated as well as
> headers. Can you show me an example, where the properties are not
> propagated down the route?

Wow, I just realized that there are producer methods to send a body and a
property. I never noticed them before because I always used the ones for
body and header(s).

But however, I need to send expected headers into most of my tests, so I
would need to have a method that takes body, header-map and a property or
even a property-map. At least in my current Camel version (2.9.x) I didn't
found a way to do this. Am I wrong? Have you another pleasant surprise for
me? :)

Thanks a lot!
Stephan



On Tue, Dec 31, 2013 at 11:06 AM, Henryk Konsek <hekon...@gmail.com> wrote:

> > @Henryk: Yes, that works fine for message headers, I use it a lot to pass
> > expected message headers. But it is not possible for Exchange properties.
>
> Are you sure? :) Exchange properties are propagated as well as
> headers. Can you show me an example, where the properties are not
> propagated down the route?
>
> > @Willem: Yes, that's true. It feels a bit "cumbersome", but it works.
>
> Yeah, the whole point of using mocking library is to reduce the
> boilerplate, so I won't implement interfaces as well. Also not always
> you would like to introduce interface for the bean and tests design
> shouldn't force you to do so. There is also a chance that you might
> work with 3rd party beans (developed by the other team for example)
> which you can't refactor. You definitely need a way to live with the
> mocks in your routes :) .
>
> > Based on your answers, I guess there is no fundamental Camel concept I am
> > missing, but simply the Camel best practices that need to mature in my
> > Camel routes and tests :-)
>
> Yes. There is no hidden Camel feature that could help you here. :)
>
> --
> Henryk Konsek
> http://henryk-konsek.blogspot.com
>

Reply via email to