简体   繁体   English

Spring 使用 DSL 集成入站 JMS 适配器

[英]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.我正在尝试构建入站通道适配器来收听位于外部 JMS 系统中的 JMS 主题。 All examples I found were done in XML and not using Spring DSL.我发现的所有示例都是在 XML 中完成的,而不是使用 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.提前致谢。

Thanks @MuPi for the link, I had to add following to the code which I reused from link.感谢@MuPi 的链接,我必须在我从链接重用的代码中添加以下内容。 codenotfound.com/spring-jms-integration-gateway-example.html 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;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM