Vishal
Vishal

Reputation: 31

Spring Integration for Inbound JMS Adapter using DSL

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.

Upvotes: 2

Views: 190

Answers (1)

Vishal
Vishal

Reputation: 31

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

Upvotes: 1

Related Questions