ContextBuilder contextBuilderCorrelationID = new ContextBuilder() {
public CamelContext buildContext(CamelContext context) throws Exception {
ConnectionFactory connectionFactory =
CamelJmsTestHelper.createConnectionFactory();
ActiveMQComponent jmsComponent = ActiveMQComponent.activeMQComponent();
jmsComponent.setConnectionFactory(connectionFactory);
jmsComponent.setUseMessageIDAsCorrelationID(false);
jmsComponent.setConcurrentConsumers(maxServerTasks);
context.addComponent(componentName, jmsComponent);
return context;
}
};
ContextBuilder contextBuilderMessageIDNamedReplyToSelector = new ContextBuilder() {
public CamelContext buildContext(CamelContext context) throws Exception {
ConnectionFactory connectionFactory =
CamelJmsTestHelper.createConnectionFactory();
ActiveMQComponent jmsComponent = ActiveMQComponent.activeMQComponent();
jmsComponent.setConnectionFactory(connectionFactory);
jmsComponent.setUseMessageIDAsCorrelationID(true);
jmsComponent.setConcurrentConsumers(maxServerTasks);
jmsComponent.getConfiguration().setReplyToDestinationSelectorName(REPLY_TO_DESTINATION_SELECTOR_NAME);
context.addComponent(componentName, jmsComponent);
return context;
}
};
ContextBuilder contextBuilderCorrelationIDNamedReplyToSelector = new ContextBuilder() {
public CamelContext buildContext(CamelContext context) throws Exception {
ConnectionFactory connectionFactory =
CamelJmsTestHelper.createConnectionFactory();
ActiveMQComponent jmsComponent = ActiveMQComponent.activeMQComponent();
jmsComponent.setConnectionFactory(connectionFactory);
jmsComponent.setUseMessageIDAsCorrelationID(false);
jmsComponent.setConcurrentConsumers(maxServerTasks);
jmsComponent.getConfiguration().setReplyToDestinationSelectorName(REPLY_TO_DESTINATION_SELECTOR_NAME);
context.addComponent(componentName, jmsComponent);
return context;
}
};
ContextBuilder contextBuilderCorrelationIDDiffComp = new ContextBuilder() {
public CamelContext buildContext(CamelContext context) throws Exception {
ConnectionFactory connectionFactory =
CamelJmsTestHelper.createConnectionFactory();
ActiveMQComponent jmsComponent = ActiveMQComponent.activeMQComponent();
jmsComponent.setConnectionFactory(connectionFactory);
jmsComponent.setConcurrentConsumers(maxServerTasks);
context.addComponent(componentName, jmsComponent);
ActiveMQComponent jmsComponent1 = ActiveMQComponent.activeMQComponent();
jmsComponent1.setConnectionFactory(connectionFactory);
jmsComponent1.setUseMessageIDAsCorrelationID(false);
jmsComponent1.setConcurrentConsumers(maxServerTasks);
context.addComponent(componentName1, jmsComponent1);
return context;
}
};
ContextBuilder contextBuilderMessageIDDiffComp = new ContextBuilder() {
public CamelContext buildContext(CamelContext context) throws Exception {
ConnectionFactory connectionFactory =
CamelJmsTestHelper.createConnectionFactory();
ActiveMQComponent jmsComponent = ActiveMQComponent.activeMQComponent();
jmsComponent.setConnectionFactory(connectionFactory);
jmsComponent.setUseMessageIDAsCorrelationID(true);
jmsComponent.setConcurrentConsumers(maxServerTasks);
context.addComponent(componentName, jmsComponent);
ActiveMQComponent jmsComponent1 = ActiveMQComponent.activeMQComponent();
jmsComponent1.setConnectionFactory(connectionFactory);
jmsComponent1.setUseMessageIDAsCorrelationID(true);
jmsComponent1.setConcurrentConsumers(maxServerTasks);
context.addComponent(componentName1, jmsComponent1);
return context;
}
};