|
|
|
@ -493,9 +493,10 @@ public class KafkaMonolithQueueFactory implements TbCoreQueueFactory, TbRuleEngi |
|
|
|
public TbQueueConsumer<TbProtoQueueMsg<ToEdgeEventNotificationMsg>> createEdgeEventMsgConsumer(TenantId tenantId, EdgeId edgeId) { |
|
|
|
TbKafkaConsumerTemplate.TbKafkaConsumerTemplateBuilder<TbProtoQueueMsg<ToEdgeEventNotificationMsg>> consumerBuilder = TbKafkaConsumerTemplate.builder(); |
|
|
|
consumerBuilder.settings(kafkaSettings); |
|
|
|
consumerBuilder.topic(topicService.buildEdgeEventNotificationsTopicPartitionInfo(tenantId, edgeId).getTopic()); |
|
|
|
String topic = topicService.buildEdgeEventNotificationsTopicPartitionInfo(tenantId, edgeId).getTopic(); |
|
|
|
consumerBuilder.topic(topic); |
|
|
|
consumerBuilder.clientId("monolith-to-edge-event-consumer-" + serviceInfoProvider.getServiceId() + "-" + edgeConsumerCount.incrementAndGet()); |
|
|
|
consumerBuilder.groupId(topicService.buildTopicName("monolith-edge-event-consumer")); |
|
|
|
consumerBuilder.groupId(topic); |
|
|
|
consumerBuilder.decoder(msg -> new TbProtoQueueMsg<>(msg.getKey(), ToEdgeEventNotificationMsg.parseFrom(msg.getData()), msg.getHeaders())); |
|
|
|
consumerBuilder.admin(edgeEventAdmin); |
|
|
|
consumerBuilder.statsService(consumerStatsService); |
|
|
|
|