简体   繁体   English

是否可以在 Spring 引导中收听多个 TIbco EMS 队列?

[英]Is it possible to listen to multiple TIbco EMS queues in Spring boot?

I am trying to create multiple queue receivers based on the queueNames from the database.我正在尝试根据数据库中的queueNames创建多个队列接收器。 I have tried creating a JpaRepository and in @Configuration class Autowired it.我尝试创建一个JpaRepository并在@Configuration Autowired中自动装配它。 But this approach is throwing error.但是这种方法会引发错误。 Is there any other way to accomplish this?有没有其他方法可以做到这一点?

Note: I am using Spring Boot.注意:我使用的是 Spring 引导。

In spring is only @JmsListener annotation but you can't change it dynamically.在 spring 中只是 @JmsListener 注释,但您不能动态更改它。

There is only one way.只有一种方法。 You can get list of topics/queues from database and after that poll topics/queues in a loop.您可以从数据库中获取主题/队列列表,然后循环轮询主题/队列。

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

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