2
votes

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.

1
are you using ActiveMQ by any chance? - Arko
I am using SonicMQ unfortunately (not an option) - Vishal
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
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

1 Answers

1
votes

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;
}