org.apache.camel.component.activemq.ActiveMQComponent Java Examples
The following examples show how to use
org.apache.camel.component.activemq.ActiveMQComponent.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ActiveMQComponentAutoConfiguration.java From camel-spring-boot with Apache License 2.0 | 5 votes |
@Lazy @Bean(name = "activemq-component") @ConditionalOnMissingBean(ActiveMQComponent.class) public ActiveMQComponent configureActiveMQComponent() throws Exception { ActiveMQComponent component = new ActiveMQComponent(); component.setCamelContext(camelContext); Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); CamelPropertiesHelper.setCamelProperties(camelContext, component, parameters, false); if (ObjectHelper.isNotEmpty(customizers)) { for (ComponentCustomizer<ActiveMQComponent> customizer : customizers) { boolean useCustomizer = (customizer instanceof HasId) ? HierarchicalPropertiesEvaluator.evaluate( applicationContext.getEnvironment(), "camel.component.customizer", "camel.component.activemq.customizer", ((HasId) customizer).getId()) : HierarchicalPropertiesEvaluator.evaluate( applicationContext.getEnvironment(), "camel.component.customizer", "camel.component.activemq.customizer"); if (useCustomizer) { LOGGER.debug("Configure component {}, with customizer {}", component, customizer); customizer.customize(component); } } } return component; }
Example #2
Source File: ActiveMQComponentProducer.java From wildfly-camel-examples with Apache License 2.0 | 5 votes |
@Produces @Named("activemq") public ActiveMQComponent createActiveMQComponent() { ActiveMQComponent activeMQComponent = ActiveMQComponent.activeMQComponent(); activeMQComponent.setConnectionFactory(connectionFactory); return activeMQComponent; }
Example #3
Source File: BookRouteConfiguration.java From spring-cloud-contract with Apache License 2.0 | 5 votes |
@Bean ActiveMQComponent activeMQComponent( @Value("${activemq.url:vm://localhost?broker.persistent=false}") String url) { ActiveMQComponent component = new ActiveMQComponent(); component.setBrokerURL(url); return component; }