Thanks Quinn.
Sending now works with this configuration:
@Bean
public ActiveMQComponent activemqAmazon() {
if (System.getProperty("http.proxyUser") != null) {
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new
PasswordAuthentication(System.getProperty("http.proxyUser"),
System.getProperty("http.proxyPassword").toCharArray());
}
});
}
ActiveMQComponent activeMQComponent = new ActiveMQComponent();
activeMQComponent.setJmsOperations(camelJmsTemplate());
return activeMQComponent;
}
@Bean
public JmsConfiguration.CamelJmsTemplate camelJmsTemplate() {
JmsConfiguration jmsConfiguration = new JmsConfiguration();
JmsConfiguration.CamelJmsTemplate camelJmsTemplate = new
JmsConfiguration.CamelJmsTemplate(jmsConfiguration,
activeMQConnectionFactory());
return camelJmsTemplate;
}
@Bean
public ActiveMQConnectionFactory activeMQConnectionFactory() {
ActiveMQConnectionFactory activeMQConnectionFactory = new
ActiveMQConnectionFactory("tcp://x.eu-central-1.compute.amazonaws.com:8080?httpEnabled=true");
return activeMQConnectionFactory;
}
But if I create a route that should consume messages it doesn't
from("activemqAmazon:UnitTopic")
.id(UnitTopicRemoteToUnitMasterTopicRoute.class.getSimpleName())
.log("Processing: ${body}")
.to("activemqLocal:topic:UnitMasterTopic");
I even don't see any connections the management console.
How do I have to configure my endpoint to consume from this topic over http?
Thanks.