Search in sources :

Example 1 with PassThroughJmsKeyFormatStrategy

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

the class JmsPassThroughtJmsKeyFormatStrategyUsingJmsConfigurationTest method createCamelContext.

protected CamelContext createCamelContext() throws Exception {
    CamelContext camelContext = super.createCamelContext();
    ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
    camelContext.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));
    JmsComponent jms = camelContext.getComponent("activemq", JmsComponent.class);
    jms.getConfiguration().setJmsKeyFormatStrategy(new PassThroughJmsKeyFormatStrategy());
    return camelContext;
}
Also used : CamelContext(org.apache.camel.CamelContext) ConnectionFactory(javax.jms.ConnectionFactory) JmsComponent(org.apache.camel.component.jms.JmsComponent) PassThroughJmsKeyFormatStrategy(org.apache.camel.component.jms.PassThroughJmsKeyFormatStrategy)

Aggregations

ConnectionFactory (javax.jms.ConnectionFactory)1 CamelContext (org.apache.camel.CamelContext)1 JmsComponent (org.apache.camel.component.jms.JmsComponent)1 PassThroughJmsKeyFormatStrategy (org.apache.camel.component.jms.PassThroughJmsKeyFormatStrategy)1