优化消息通道
parent
eec4e347d7
commit
72b9239c5a
|
@ -221,7 +221,7 @@ public class ZLMRTPServerFactory {
|
||||||
if (localPort == 0) {
|
if (localPort == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}alarm
|
||||||
SendRtpItem sendRtpItem = new SendRtpItem();
|
SendRtpItem sendRtpItem = new SendRtpItem();
|
||||||
sendRtpItem.setIp(ip);
|
sendRtpItem.setIp(ip);
|
||||||
sendRtpItem.setPort(port);
|
sendRtpItem.setPort(port);
|
||||||
|
|
|
@ -85,6 +85,7 @@ public class RedisAlarmMsgListener implements MessageListener {
|
||||||
if (parentPlatforms.size() > 0) {
|
if (parentPlatforms.size() > 0) {
|
||||||
for (ParentPlatform parentPlatform : parentPlatforms) {
|
for (ParentPlatform parentPlatform : parentPlatforms) {
|
||||||
try {
|
try {
|
||||||
|
deviceAlarm.setChannelId(parentPlatform.getDeviceGBId());
|
||||||
commanderForPlatform.sendAlarmMessage(parentPlatform, deviceAlarm);
|
commanderForPlatform.sendAlarmMessage(parentPlatform, deviceAlarm);
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
} catch (SipException | InvalidArgumentException | ParseException e) {
|
||||||
logger.error("[命令发送失败] 国标级联 发送报警: {}", e.getMessage());
|
logger.error("[命令发送失败] 国标级联 发送报警: {}", e.getMessage());
|
||||||
|
@ -97,6 +98,7 @@ public class RedisAlarmMsgListener implements MessageListener {
|
||||||
if (parentPlatforms.size() > 0) {
|
if (parentPlatforms.size() > 0) {
|
||||||
for (ParentPlatform parentPlatform : parentPlatforms) {
|
for (ParentPlatform parentPlatform : parentPlatforms) {
|
||||||
try {
|
try {
|
||||||
|
deviceAlarm.setChannelId(parentPlatform.getDeviceGBId());
|
||||||
commanderForPlatform.sendAlarmMessage(parentPlatform, deviceAlarm);
|
commanderForPlatform.sendAlarmMessage(parentPlatform, deviceAlarm);
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
} catch (SipException | InvalidArgumentException | ParseException e) {
|
||||||
logger.error("[命令发送失败] 国标级联 发送报警: {}", e.getMessage());
|
logger.error("[命令发送失败] 国标级联 发送报警: {}", e.getMessage());
|
||||||
|
@ -110,6 +112,7 @@ public class RedisAlarmMsgListener implements MessageListener {
|
||||||
if (devices.size() > 0) {
|
if (devices.size() > 0) {
|
||||||
for (Device device : devices) {
|
for (Device device : devices) {
|
||||||
try {
|
try {
|
||||||
|
deviceAlarm.setChannelId(device.getDeviceId());
|
||||||
commander.sendAlarmMessage(device, deviceAlarm);
|
commander.sendAlarmMessage(device, deviceAlarm);
|
||||||
} catch (InvalidArgumentException | SipException | ParseException e) {
|
} catch (InvalidArgumentException | SipException | ParseException e) {
|
||||||
logger.error("[命令发送失败] 发送报警: {}", e.getMessage());
|
logger.error("[命令发送失败] 发送报警: {}", e.getMessage());
|
||||||
|
|
Loading…
Reference in New Issue