|
|
@ -1101,11 +1101,19 @@ public class DefaultTransportService extends TransportActivityManager implements |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void sendToCore(TenantId tenantId, EntityId entityId, ToCoreMsg msg, UUID routingKey, TransportServiceCallback<Void> callback) { |
|
|
private void sendToCore(TenantId tenantId, EntityId entityId, ToCoreMsg msg, UUID routingKey, TransportServiceCallback<Void> callback) { |
|
|
TopicPartitionInfo tpi = partitionService.resolve(ServiceType.TB_CORE, tenantId, entityId); |
|
|
TopicPartitionInfo tpi; |
|
|
|
|
|
try { |
|
|
|
|
|
tpi = partitionService.resolve(ServiceType.TB_CORE, tenantId, entityId); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
log.warn("Failed to send message to core. Tenant with ID [{}], routingKey [{}], msg [{}]. Message delivery aborted.", tenantId, routingKey, msg, e); |
|
|
|
|
|
if (callback != null) { |
|
|
|
|
|
callback.onError(e); |
|
|
|
|
|
} |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
if (log.isTraceEnabled()) { |
|
|
if (log.isTraceEnabled()) { |
|
|
log.trace("[{}][{}] Pushing to topic {} message {}", tenantId, entityId, tpi.getFullTopicName(), msg); |
|
|
log.trace("[{}][{}] Pushing to topic {} message {}", tenantId, entityId, tpi.getFullTopicName(), msg); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
TransportTbQueueCallback transportTbQueueCallback = callback != null ? |
|
|
TransportTbQueueCallback transportTbQueueCallback = callback != null ? |
|
|
new TransportTbQueueCallback(callback) : null; |
|
|
new TransportTbQueueCallback(callback) : null; |
|
|
tbCoreProducerStats.incrementTotal(); |
|
|
tbCoreProducerStats.incrementTotal(); |
|
|
|