Skip to content

Reduce log spam from 'slow consumers' events in NATS source #24229

@benjamin-awd

Description

@benjamin-awd

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

When the subscriber buffer fills up, the NATS source repeatedly logs async_nats: event: slow consumers for subscription 1, potentially producing millions of redundant log entries in a short period. This excessive logging adds noise and increases operational costs.

Image

Configuration

sources:
  internal_metrics:
    type: internal_metrics
  foo:
    type: nats
    queue: foo
    subscriber_capacity: 131072
    url: ...
    auth:
      strategy: user_password
      user_password:
        user: ...
        password: ...
    connection_name: foo
    subject: "data.foo.>"
  bar:
    type: nats
    queue: bar
    subscriber_capacity: 131072
    url: ...
    auth:
      strategy: user_password
      user_password:
        user: ...
        password: ...
    connection_name: bar
    subject: "data.bar.>"
...
<roughly 50 similar sources>

Version

0.51.0

Debug Output


Example Data

No response

Additional Context

I'm not sure why the slow consumer events aren't being intercepted, the solution here seems to be to intercept. slow consumer events before they get logged by async_nats

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugA code related bug.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions