use of org.apache.camel.component.sjms.SjmsComponent in project ddf by codice.
the class TestMessageBroker method setupCamelContext.
private void setupCamelContext() throws Exception {
camelContext = new DefaultCamelContext();
ConnectionFactory factory = getServiceManager().getService(ConnectionFactory.class);
SjmsComponent sjms = new SjmsComponent();
sjms.setConnectionFactory(factory);
camelContext.addComponent("sjms", sjms);
camelContext.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from(SJMS_EXAMPLE_TEST_TOPIC).to(MOCK_EXAMPLE_TEST_ROUTE);
from(SJMS_UNDELIVERED_TEST_QUEUE).process(exchange -> {
if (BLOW_UP.get()) {
throw new Exception("Boom!!!");
}
}).to(MOCK_UNDELIVERED_TEST_ENDPOINT);
}
});
camelContext.start();
}
use of org.apache.camel.component.sjms.SjmsComponent in project camel by apache.
the class MllpTcpServerConsumerTransactionTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry registry = super.createRegistry();
SjmsComponent target = new SjmsComponent();
target.setConnectionFactory(broker.createConnectionFactory());
registry.bind("target", target);
return registry;
}
Aggregations