Skip to content

Commit

Permalink
add pid to consumerinstanceid
Browse files Browse the repository at this point in the history
  • Loading branch information
ekneg54 committed Oct 9, 2024
1 parent 26fab9e commit 4661308
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion logprep/connector/confluent_kafka/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"""
# pylint: enable=line-too-long
import logging
import os
from functools import cached_property, partial
from socket import getfqdn
from types import MappingProxyType
Expand Down Expand Up @@ -270,7 +271,9 @@ def _kafka_config(self) -> dict:
}
DEFAULTS.update({"client.id": getfqdn()})
DEFAULTS.update(
{"group.instance.id": f"{getfqdn().strip('.')}-Pipeline{self.pipeline_index}"}
{
"group.instance.id": f"{getfqdn().strip('.')}-Pipeline{self.pipeline_index}-pid{os.getpid()}"
}
)
return DEFAULTS | self._config.kafka_config | injected_config

Expand Down

0 comments on commit 4661308

Please sign in to comment.