|
@@ -49,9 +49,14 @@ public class JmsConfig {
|
|
|
private RedisUtil4EngineStater redisUtil;
|
|
|
|
|
|
/**
|
|
|
- * 交换机
|
|
|
+ * 业务中台交换机
|
|
|
*/
|
|
|
- private final String exchange = "exchange-alarm-service";
|
|
|
+ private final String exchangeAlarmService = "exchange-alarm-service";
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 数据中台交换机
|
|
|
+ */
|
|
|
+ private final String exchangeDmpAlarm = "exchange-dmp";
|
|
|
|
|
|
/**
|
|
|
* 报警条件路由键
|
|
@@ -114,7 +119,12 @@ public class JmsConfig {
|
|
|
|
|
|
@Bean
|
|
|
public TopicExchange alarmServiceExchange() {
|
|
|
- return new TopicExchange(exchange);
|
|
|
+ return new TopicExchange(exchangeAlarmService);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Bean
|
|
|
+ public TopicExchange dmpAlarmExchange() {
|
|
|
+ return new TopicExchange(exchangeDmpAlarm);
|
|
|
}
|
|
|
|
|
|
@Bean
|
|
@@ -129,7 +139,7 @@ public class JmsConfig {
|
|
|
|
|
|
@Bean
|
|
|
public Binding alarmConfigBinding() {
|
|
|
- return BindingBuilder.bind(alarmConfigQueue()).to(alarmServiceExchange()).with(alarmConfigRoutingKey);
|
|
|
+ return BindingBuilder.bind(alarmConfigQueue()).to(dmpAlarmExchange()).with(alarmConfigRoutingKey);
|
|
|
}
|
|
|
|
|
|
@Bean
|
|
@@ -167,7 +177,7 @@ public class JmsConfig {
|
|
|
msgHandler.syncUpdateObjConditionRelList(msg);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- log.error("报警条件消息消费失败,{}", e.getMessage());
|
|
|
+ log.error("报警条件消息消费失败", e);
|
|
|
}
|
|
|
channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
|
|
|
}
|
|
@@ -208,7 +218,7 @@ public class JmsConfig {
|
|
|
JSONObject data = msg.getExts();
|
|
|
redisUtil.unlock(alarmRecordLockPrefix + data.getString("id"));
|
|
|
} catch (Exception e) {
|
|
|
- log.error("报警记录消息消费失败,{}", e.getMessage());
|
|
|
+ log.error("报警记录消息消费失败", e);
|
|
|
}
|
|
|
channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
|
|
|
}
|
|
@@ -235,7 +245,7 @@ public class JmsConfig {
|
|
|
}
|
|
|
channel.basicAck(message.getMessageProperties().getDeliveryTag(),false);
|
|
|
} catch (Exception e) {
|
|
|
- log.error("消息消费失败,{}", e.getMessage());
|
|
|
+ log.error("消息消费失败", e);
|
|
|
}
|
|
|
}
|
|
|
}
|