Browse Source

ClusterService - pushNotificationToTransport - fire callback.onSuccess(null) if serviceId is empty

pull/5357/head
Sergey Matvienko 5 years ago
parent
commit
4ea397b4d5
  1. 3
      application/src/main/java/org/thingsboard/server/service/queue/DefaultTbClusterService.java

3
application/src/main/java/org/thingsboard/server/service/queue/DefaultTbClusterService.java

@ -198,6 +198,9 @@ public class DefaultTbClusterService implements TbClusterService {
public void pushNotificationToTransport(String serviceId, ToTransportMsg response, TbQueueCallback callback) {
if (serviceId == null || serviceId.isEmpty()){
log.trace("pushNotificationToTransport: skipping message without serviceId [{}], (ToTransportMsg) response [{}]", serviceId, response);
if (callback != null) {
callback.onSuccess(null); //callback that message already sent, no useful payload expected
}
return;
}
TopicPartitionInfo tpi = partitionService.getNotificationsTopic(ServiceType.TB_TRANSPORT, serviceId);

Loading…
Cancel
Save