use of org.apache.camel.builder.DeadLetterChannelBuilder in project camel by apache.
the class OnExceptionErrorHandlerRefIssueTwoRoutesTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
use of org.apache.camel.builder.DeadLetterChannelBuilder in project camel by apache.
the class OnExceptionNotHandledErrorHandlerRefIssueTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
use of org.apache.camel.builder.DeadLetterChannelBuilder in project camel by apache.
the class OnExceptionNotHandledErrorHandlerRefIssueTwoRoutesTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
jndi.bind("myDLC", new DeadLetterChannelBuilder("mock:dead"));
return jndi;
}
use of org.apache.camel.builder.DeadLetterChannelBuilder in project camel by apache.
the class ErrorHandlerDefinitionParserTest method testDeadLetterErrorHandler.
public void testDeadLetterErrorHandler() {
DeadLetterChannelBuilder errorHandler = ctx.getBean("deadLetterErrorHandler", DeadLetterChannelBuilder.class);
assertNotNull(errorHandler);
assertEquals("Get wrong deadletteruri", "log:dead", errorHandler.getDeadLetterUri());
RedeliveryPolicy policy = errorHandler.getRedeliveryPolicy();
assertNotNull(policy);
assertEquals("Wrong maximumRedeliveries", 2, policy.getMaximumRedeliveries());
assertEquals("Wrong redeliveryDelay", 1000, policy.getRedeliveryDelay());
assertEquals("Wrong logStackTrace", true, policy.isLogHandled());
assertEquals("Wrong asyncRedeliveryDelayed", true, policy.isAsyncDelayedRedelivery());
}
use of org.apache.camel.builder.DeadLetterChannelBuilder in project camel by apache.
the class RouteScopedOnExceptionMultipleRouteBuildersTest method createCamelContext.
@Override
@SuppressWarnings("deprecation")
protected CamelContext createCamelContext() throws Exception {
CamelContext context = new DefaultCamelContext(createRegistry());
context.setErrorHandlerBuilder(new DeadLetterChannelBuilder("mock:dead"));
context.setLazyLoadTypeConverters(isLazyLoadingTypeConverter());
return context;
}
Aggregations