Oh you are right! With JmsComponent it works.
Thank you very much for your help.

My config looks like:

   @Bean
    public JmsComponent activemqAmazon() {
        JmsComponent jmsComponent = new JmsComponent();
        jmsComponent.setConnectionFactory(activeMQConnectionFactory());
        return jmsComponent;
    }

    @Bean
    public ActiveMQConnectionFactory activeMQConnectionFactory() {
        ActiveMQConnectionFactory activeMQConnectionFactory = new 
ActiveMQConnectionFactory("tcp://x.eu-central-1.compute.amazonaws.com:8080?httpEnabled=true");
        return activeMQConnectionFactory;
    }

And because of the HTTP tunnel I see:

2018-08-13 19:12:17.058  WARN 8924 --- [umer[UnitTopic]] 
c.c.j.DefaultJmsMessageListenerContainer : Setup of JMS message listener 
invoker failed for destination 'UnitTopic' - trying to recover. Cause: Session 
is closed
2018-08-13 19:12:17.153  INFO 8924 --- [umer[UnitTopic]] 
c.c.j.DefaultJmsMessageListenerContainer : Successfully refreshed JMS Connection

But I assume that this WARN is ok because of the HTTP tunnel.

Reply via email to