设备目录查询 key 调整
This commit is contained in:
parent
d3bf7b4056
commit
60ea2fc372
@ -82,7 +82,7 @@ public class MessageRequestProcessor implements MessageProcessor {
|
||||
() -> log.warn("对应订阅 {} 已结束, 异常数据 => {}", key, dto));
|
||||
}else if(messageDto.getCmdType().equalsIgnoreCase(CmdType.CATALOG)){
|
||||
CatalogResponseDTO catalogResponseDTO = MANSCDPUtils.parse(content, CatalogResponseDTO.class);
|
||||
String key = GenericSubscribe.Helper.getKey(catalogResponseDTO.getDeviceId(), catalogResponseDTO.getSn());
|
||||
String key = GenericSubscribe.Helper.getKey(CmdType.CATALOG,catalogResponseDTO.getDeviceId(), catalogResponseDTO.getSn());
|
||||
Optional.ofNullable(subscribe.getSipRequestSubscribe().getPublisher(key)).ifPresent(publisher->{
|
||||
publisher.submit(request);
|
||||
});
|
||||
|
@ -1,6 +1,7 @@
|
||||
package cn.skcks.docking.gb28181.service.catalog;
|
||||
|
||||
import cn.skcks.docking.gb28181.config.sip.SipConfig;
|
||||
import cn.skcks.docking.gb28181.constant.CmdType;
|
||||
import cn.skcks.docking.gb28181.core.sip.message.request.SipRequestBuilder;
|
||||
import cn.skcks.docking.gb28181.core.sip.message.subscribe.GenericSubscribe;
|
||||
import cn.skcks.docking.gb28181.core.sip.message.subscribe.SipSubscribe;
|
||||
@ -64,7 +65,7 @@ public class CatalogService {
|
||||
.sn(sn)
|
||||
.build();
|
||||
Request request = requestBuilder.createMessageRequest(callId, cSeq, MANSCDPUtils.toByteXml(catalogQueryDTO));
|
||||
String key = GenericSubscribe.Helper.getKey(gbDeviceId,sn);
|
||||
String key = GenericSubscribe.Helper.getKey(CmdType.CATALOG, gbDeviceId, sn);
|
||||
subscribe.getSipRequestSubscribe().addPublisher(key, 60, TimeUnit.SECONDS);
|
||||
subscribe.getSipRequestSubscribe().addSubscribe(key, new Flow.Subscriber<>() {
|
||||
private Flow.Subscription subscription;
|
||||
|
Loading…
Reference in New Issue
Block a user