By the way, I noticed that as of Camel 2.16 they've added an
"ignoreInvalidEndpoint" flag which may be for exactly the reasons you
need.  During testing you'd set up an endpoint to receive messages but in
production those test endpoints, not used for monitoring, wouldn't have
endpoints associated with them and so would be ignored.

Brad

On Thu, Apr 21, 2016 at 10:15 PM, Brad Johnson <brad.john...@mediadriver.com
> wrote:

> I'll let others comment on this more fully but will make on observation
> that will depend very much on your needs outside of testing.
>
> The wiretap allows you to get a full copy of an exchange and send it off
> on a separate route.  That is actually a good mechanism if you might later
> use that for monitoring of the route as well as for testing.  But it does
> do a copy so there's some memory overhead involved.  It can then be used
> for testing and for monitoring.  But if that monitoring isn't desirable
> later you may not want to use it.  Still, it is worth knowing or thinking
> about.
>
> http://camel.apache.org/wire-tap.html
>
> On Thu, Apr 21, 2016 at 1:18 PM, Jeff Segal <jeffrey.se...@gmail.com>
> wrote:
>
>> I've got a route that I'd like to do some unit testing on at various
>> stages. It does a few splits, sets some headers, etc. The problem is that
>> there's no actual endpoint for me to intercept until the very end, but I'd
>> like to do some verification midway through.
>>
>> I suppose I could add arbitrary mock endpoints in key spots to use as
>> interceptSendTo hooks, but I'd rather not pollute my route with test
>> scaffolding like that. I've also tried using vanilla intercept().when()
>> calls but those end up casting too wide a net to be useful (or don't offer
>> a straightforward way for to intercept where and only where I want to).
>>
>> Is there a better alternative to solving this problem than injecting
>> arbitrary mocks into my production routes?
>>
>> Jeff
>>
>
>

Reply via email to