Skip to content

nats_jetstream output does not detect disconnect #3257

@njkleiner

Description

@njkleiner

The nats_jetstream output does not appear to implement logic for detecting that a message publishing failure is caused by the connection to the NATS server having been lost. Consequently, according to the Prometheus metrics and the /ready health check endpoint, the output continues to appear as "up", which is clearly wrong.

From taking a quick look at the code, it would appear that fixing this is as simple as inspecting the error returned here after a message could not be published and conditionally returning service.ErrNotConnected.

Note that the nats output already appears to implement this logic, so I'm assuming this is simply an oversight and not intended behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnatsIssues relating to NATS and Jetstreamneeds investigationIt looks as though have all the information needed but investigation is required

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions