#26345·vector

NATS source declares can_acknowledge() = true while its docs declare acknowledgements: no, suppressing the end-to-end acknowledgement warning

Author: max-tetCreated Sep 10, 2026Updated Sep 10, 2026
Labelssource: nats

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

The NATS source reference documents acknowledgements: no, and that matches the implementation: run_nats_jetstream calls msg.ack() as soon as send_batch has handed the events into the topology channel, and no BatchNotifier appears in the file.

But NatsSourceConfig::can_acknowledge() returns true unconditionally (src/sources/nats/config.rs ~279-282), while build() never calls cx.do_acknowledgements(...).

As a result, propagate_acknowledgements() (src/config/mod.rs ~213-246, warning at ~241) skips the warning it emits for non-acknowledging sources:

Source has acknowledgements enabled by a sink, but acknowledgements are not supported by this source. Silent data loss could occur.

So a JetStream source feeding a sink with acknowledgements: enabled: true boots clean, with nothing indicating the guarantee is absent.

Reproduce

  1. A nats source in JetStream mode feeding any sink with acknowledgements: enabled: true (config below).
  2. Start Vector and read the boot log.
  3. Expected: the warning above, per the documented acknowledgements: no. Actual: no warning.

Suggested fix: make can_acknowledge() reflect what is implemented — false, or self.jetstream.is_some() once the source actually participates. PR #26217 contains this narrowing as part of a much larger change; this issue asks for it on its own, so operators on released versions get the warning the framework is designed to give them.

Configuration

sources:
  nats_in:
    type: nats
    url: nats://127.0.0.1:4222
    subject: test.>
    connection_name: ack-warning-repro
    jetstream:
      stream: TEST
      consumer: test-consumer

sinks:
  out:
    type: blackhole
    inputs: [nats_in]
    acknowledgements:
      enabled: true

Version

0.54.0

Debug Output

Example Data

No response

Additional Context

Found while assessing end-to-end delivery guarantees for a compliance-relevant data path, where we needed to know whether an acknowledgement-enabled sink gave us anything on a JetStream source. It does not — which the documentation states plainly, and which we accept. The problem is only that the code claims otherwise and therefore silences the one warning that would have told us. We are not asking for the acknowledgement feature in this issue.

Docs page showing acknowledgements: no: https://vector.dev/docs/reference/configuration/sources/nats/

References

PR #26217 — adds end-to-end acknowledgement support to the NATS source and includes the same can_acknowledge() narrowing as part of a larger change. Open, draft, unreviewed at the time of writing. This issue is deliberately narrower and independent of whether that PR proceeds.