nats-io / nats.rs

Rust client for NATS, the cloud native messaging system.
Apache License 2.0
980 stars 159 forks source link

Use last header value for JetStream messages #1239

Closed Jarema closed 2 months ago

Jarema commented 3 months ago

As republish will append new headers, using first value could lead to misleading data when a message is republish from one stream to another.

This commit fixes it by always picking the last header value.

reference ADR issue: https://github.com/nats-io/nats-architecture-and-design/issues/250

Signed-off-by: Tomasz Pietrek <tomasz@nats.io