-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust: add more rust logging #351
Conversation
@@ -505,6 +515,7 @@ mod tests { | |||
impl AssignmentCallbacks for EmptyCallbacks { | |||
fn on_assign(&self, partitions: HashMap<Partition, u64>) { | |||
println!("assignment event: {:?}", partitions); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -628,6 +628,11 @@ def close(self, timeout: Optional[float] = None) -> None: | |||
def closed(self) -> bool: | |||
return self.__state is KafkaConsumerState.CLOSED | |||
|
|||
@property | |||
def member_id(self) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should also add @cached_property
, depending on the cost?
def member_id(self) -> str: | |
@cached_property | |
def member_id(self) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it cheap. Also, I believe the member id changes depending on the rebalancing strategy used. So caching might be inacurate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not too happy to see unsafe
and unwrap
, but I guess rdkafka does not provide a safe function for this?
Adds more logging to rust to more closely match python. Specifically, we add logging to show when the processor is terminating or closing/rejoining strategies.
We also introduce logging to show the member id as supplied by the broker. This is useful for debugging issue related to rebalancing in kafka since the broker logs only show member id.