Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix serde Stream roundtrip #1294

Merged
merged 2 commits into from
Aug 5, 2024
Merged

Fix serde Stream roundtrip #1294

merged 2 commits into from
Aug 5, 2024

Conversation

Jarema
Copy link
Member

@Jarema Jarema commented Aug 2, 2024

If someone does a serde serialize/deserialize roundtrip with jetstream::stream::Stream, it will result in error, as then ConsumerLimits will be null.
This should not happen in real-world scenarios, as server does not send nulls for those values, however its good to protect against those scenarios in case Go/nats-server changes its behaviour as some point in time.

closes #1293

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

Jarema added 2 commits August 2, 2024 15:33
If someone does a serde serialize/deserialize roundtrip with
jetstream::stream::Stream, it will result in error, as then
`ConsumerLimits` will be `null`.
This should not happen in real-world scenarios, as server does not send
nulls for those values, however its good to protect against those
scenarios in case Go/nats-server changes its behaviour as some point in time.

Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
@Jarema Jarema requested a review from caspervonb August 5, 2024 03:29
@Jarema Jarema merged commit e9919a0 into main Aug 5, 2024
12 checks passed
@Jarema Jarema deleted the fix-stream-serde-roundtrip branch August 5, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure to deserialise Config for Message Stream
2 participants