Skip to content

Question: connection loss notification #2522

@DefaultUser1606

Description

@DefaultUser1606

When I deliberately shut down the kafka server that my consumer is subscribed to, I can see the consumer generates a large volume of logs signalling failed attempts to connect to the server.

I could not, however, find any mention in the documentation, or the api, of a way to notify the application itself that the connection is experiencing issues. My scenario is pretty simple - the application connects and consumes messages, but when there is a loss in connection I would like to notify the user that they are not receiving new messages. There seems to be no obvious way in the current version to get this information, despite the consumer itself obviously being perfectly aware of when it loses connection.

What is the correct approach to get information about the connection state from the consumer? Is there any way at all?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions