Hi You can weave and replace with a mock, and then on the mock endpoint you can specify that it should throw an exception on the first message, or the N'th message, with the whenExchangeReceive method.
The Camel in Action book covers this in the testing chapter. On Sat, May 13, 2017 at 8:11 PM, carlphilipp <[email protected]> wrote: > Hello everybody, > > I would like to make sure my redeliver logic is working. I do not find any > feature to do that. > For example, is there anyway to do: > > weaveById("ws-call").replace().throwException(new RuntimeException()); > > This will throw the exception anytime, what if I want to make it fail only > once? > > Thanks, > Carl > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-test-redeliver-messages-tp5799456.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
