Search in sources :

Example 16 with JmsComponent

use of org.apache.camel.component.jms.JmsComponent in project ddf by codice.

the class AmqpProducerConsumerExample method createCamelContext.

private void createCamelContext() throws Exception {
    CamelContext camelContext = getContext();
    JmsConnectionFactory connectionFactory = new JmsConnectionFactory("admin", "admin", "amqps://localhost:5671");
    JmsComponent jms = JmsComponent.jmsComponent(connectionFactory);
    AMQPComponent amqp = new AMQPComponent(connectionFactory);
    camelContext.addComponent("jms", jms);
    camelContext.addComponent("amqp", amqp);
}
Also used : CamelContext(org.apache.camel.CamelContext) JmsComponent(org.apache.camel.component.jms.JmsComponent) JmsConnectionFactory(org.apache.qpid.jms.JmsConnectionFactory) AMQPComponent(org.apache.camel.component.amqp.AMQPComponent)

Example 17 with JmsComponent

use of org.apache.camel.component.jms.JmsComponent in project camel by apache.

the class HttpAsyncDslTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    JndiContext answer = new JndiContext();
    // add ActiveMQ with embedded broker
    ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
    JmsComponent amq = jmsComponentAutoAcknowledge(connectionFactory);
    amq.setCamelContext(context);
    answer.bind("jms", amq);
    return answer;
}
Also used : ConnectionFactory(javax.jms.ConnectionFactory) JmsComponent(org.apache.camel.component.jms.JmsComponent) JndiContext(org.apache.camel.util.jndi.JndiContext)

Example 18 with JmsComponent

use of org.apache.camel.component.jms.JmsComponent in project camel by apache.

the class RemoveEndpointsTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    JndiContext answer = new JndiContext();
    // add ActiveMQ with embedded broker
    ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
    JmsComponent amq = jmsComponentAutoAcknowledge(connectionFactory);
    amq.setCamelContext(context);
    answer.bind("jms", amq);
    return answer;
}
Also used : ConnectionFactory(javax.jms.ConnectionFactory) JmsComponent(org.apache.camel.component.jms.JmsComponent) JndiContext(org.apache.camel.util.jndi.JndiContext)

Example 19 with JmsComponent

use of org.apache.camel.component.jms.JmsComponent in project camel by apache.

the class DynamicRouteTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    JndiContext answer = new JndiContext();
    // add ActiveMQ with embedded broker
    ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
    JmsComponent amq = jmsComponentAutoAcknowledge(connectionFactory);
    amq.setCamelContext(context);
    answer.bind("jms", amq);
    answer.bind("myBean", new MyBean());
    return answer;
}
Also used : ConnectionFactory(javax.jms.ConnectionFactory) JmsComponent(org.apache.camel.component.jms.JmsComponent) JndiContext(org.apache.camel.util.jndi.JndiContext)

Example 20 with JmsComponent

use of org.apache.camel.component.jms.JmsComponent in project camel by apache.

the class JmsHttpJmsTest method createJndiContext.

@Override
protected Context createJndiContext() throws Exception {
    JndiContext answer = new JndiContext();
    // add ActiveMQ with embedded broker
    ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
    JmsComponent amq = jmsComponentAutoAcknowledge(connectionFactory);
    amq.setCamelContext(context);
    answer.bind("jms", amq);
    return answer;
}
Also used : ConnectionFactory(javax.jms.ConnectionFactory) JmsComponent(org.apache.camel.component.jms.JmsComponent) JndiContext(org.apache.camel.util.jndi.JndiContext)

Aggregations

JmsComponent (org.apache.camel.component.jms.JmsComponent)25 ConnectionFactory (javax.jms.ConnectionFactory)21 JndiContext (org.apache.camel.util.jndi.JndiContext)16 CamelContext (org.apache.camel.CamelContext)6 ActiveMQConnectionFactory (org.apache.activemq.ActiveMQConnectionFactory)3 HashMap (java.util.HashMap)1 Map (java.util.Map)1 ActiveMQSslConnectionFactory (org.apache.activemq.ActiveMQSslConnectionFactory)1 BrokerService (org.apache.activemq.broker.BrokerService)1 PooledConnectionFactory (org.apache.activemq.pool.PooledConnectionFactory)1 RouteBuilder (org.apache.camel.builder.RouteBuilder)1 AMQPComponent (org.apache.camel.component.amqp.AMQPComponent)1 JmsConfiguration (org.apache.camel.component.jms.JmsConfiguration)1 PassThroughJmsKeyFormatStrategy (org.apache.camel.component.jms.PassThroughJmsKeyFormatStrategy)1 DefaultCamelContext (org.apache.camel.impl.DefaultCamelContext)1 CamelBeanPostProcessor (org.apache.camel.spring.CamelBeanPostProcessor)1 JmsConnectionFactory (org.apache.qpid.jms.JmsConnectionFactory)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1 ConditionalOnBean (org.springframework.boot.autoconfigure.condition.ConditionalOnBean)1