2

I am trying to build Inbound Channel Adapter to listen to JMS Topic which is located in external JMS system. All examples I found were done in XML and not using Spring DSL. Has any of you done it before and if so then please share knowledge or point to any online resource? I am looking for annotations to use.

Thanks in advance.

Vishal
  • 31
  • 3
  • hope this helps https://codenotfound.com/spring-jms-integration-gateway-example.html – Arko May 23 '20 at 18:12
  • are you using ActiveMQ by any chance? – Arko May 23 '20 at 18:14
  • I am using SonicMQ unfortunately (not an option) – Vishal May 23 '20 at 19:08
  • Thanks for link, I was able to use code from that link with some modifications for SonicMQ. I had to create my own connection factory implementation for SonicMQ and it worked. – Vishal May 23 '20 at 19:49
  • if you have solved your problem please share the solution with rest of the members. and then you can accept your own answer. It will help for those who are looking for a similar solution. – Arko May 24 '20 at 13:53

1 Answers1

1

Thanks @MuPi for the link, I had to add following to the code which I reused from link. codenotfound.com/spring-jms-integration-gateway-example.html

    @Value("${spring.sonic.broker-url}")
private String connectionURL;

    @Bean
public ConnectionFactory connectionFactory() {
    ConnectionFactory connectionFactory = null;
    try {
        connectionFactory = new progress.message.jclient.ConnectionFactory(connectionURL,null, null);
    } catch (JMSException e) {
        e.printStackTrace();
    }

    return connectionFactory;
}
Vishal
  • 31
  • 3