Skip to content

[[inputs.nats_consumer]] Don't ack messages not delivered to output successfully #17791

@inakimalerba

Description

@inakimalerba

Use Case

When using the nats_consumer input plugin, you might not want to queue all pending messages in the Telegraf buffer but use NATS stream instead.

Expected behavior

Messages not delivered through an output should not be acked on NATS to avoid depending on Telegraf for persistance of the data.

Actual behavior

Messages are acked in NATS as soon as they are consumed by Telegraf input.

If messages are not being delivered to the output (ie InfluxDB target is down) messages are buffered in Telegraf. If Telegraf goes down (ie OOM because of the buffer size) all the messages are lost.

Additional info

Discussed in Slack: https://influxcommunity.slack.com/archives/CH99HUH8V/p1759915175769359

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequests for new plugin and for new features to existing plugins

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions