NATS source declares can_acknowledge() = true while its docs declare acknowledgements: no, suppressing the end-to-end acknowledgement warning
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 85/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- observability, stream-processing
Direzione di ricerca
Inizia da src/sources/nats/config.rs intorno a NatsSourceConfig::can_acknowledge() e ispeziona build(), quindi segui propagate_acknowledgements() in src/config/mod.rs. Riproduci la configurazione JetStream con un sink per il quale gli acknowledgement sono abilitati e verifica che la modifica completata faccia comparire l’avviso documentato relativo all’assenza di acknowledgement.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- A
natssource in JetStream mode feeding any sink withacknowledgements: enabled: true(config below). - Start Vector and read the boot log.
- 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.
- Lingua principale
- Rust
- Stelle
- 22.8k
- Fork
- 2.4k
- Merge medio
- 1g 13h
- PR unite (30g)
- 273
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di vectordotdev/vector
-
website: make content headings keyboard-focusable so Tab moves through the pageForse già presa @nightcityblade l’ha presa 33 giorni fa. Apertadomain:website good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vectordotdev/vector#26581 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vectordotdev/vector#26565 ·
I maintainer di solito rispondono entro 1 giorno
-
disk buffer: reader can be notified before the data file write completes, delaying the sink's sendAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
vectordotdev/vector#26523 · 8 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
`component_sent_bytes_total` for the `loki` sink reports compressed bytes, unlike other sinksForse già presa @ashokram-si l’ha presa 14 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
vectordotdev/vector#26510 ·
I maintainer di solito rispondono entro 1 giorno
-
Doris Sink Error Log in verbose modeForse di nuovo libera @arfa79 l’ha presa 56 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vectordotdev/vector#26353 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di vectordotdev/vector
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug CLI
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
HigherOrderCO/Bend#2120 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
KNXBench-Labs/KNXBench#47 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
software-mansion/pathfinder#3620 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno