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;
}
use of org.apache.camel.component.sjms.SjmsComponent in project ddf by codice.
the class CoreProducerConsumerExample method createCamelContext.
private void createCamelContext() throws Exception {
CamelContext camelContext = getContext();
ActiveMQConnectionFactory factory = ActiveMQJMSClient.createConnectionFactory("(tcp://0.0.0.0:5672,tcp://0.0.0.0:61617)?ha=true;sslEnabled=true;enabledCipherSuites=TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256;enabledProtocols=TLSv1.1,TLSv1.2", "name");
factory.setRetryInterval(1000);
factory.setRetryIntervalMultiplier(1.0);
factory.setReconnectAttempts(-1);
SjmsComponent sjms = new SjmsComponent();
ConnectionFactoryResource connectionResource = new ConnectionFactoryResource(1, factory, "admin", "admin");
sjms.setConnectionResource(connectionResource);
camelContext.addComponent("sjms", sjms);
}
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();
}
Aggregations