|
@@ -21,9 +21,14 @@ public class QueueNameService {
|
|
|
String queue ;
|
|
|
@Autowired
|
|
|
IMqEcsService mqEcsService;
|
|
|
-
|
|
|
+ @Value("${mq.listener.dynamic}")
|
|
|
+ private boolean isDynamic;
|
|
|
public String getQueueName(){
|
|
|
String queueName = queue;
|
|
|
+ if (!isDynamic){
|
|
|
+ log.info("不是弹性服务,应该获取默认队列去启动,监听队列名为:{}",queueName);
|
|
|
+ return queue;
|
|
|
+ }
|
|
|
if(StrUtil.isBlank(SysConstants.hostName)){
|
|
|
log.info("获取hostName失败,监听队列名为:{}",queueName);
|
|
|
return queueName;
|