Closed bengsparks closed 1 month ago
Looks good to me, as a test one could confirm that the config is reported back as expected. Maybe split the nats change into its own PR for changelog generation.
@caspervonb
The PR now includes a test in async-nats/tests/jetstream_tests.rs
that can be executed via cargo test jetstream::consumer_configs_sample_frequency
, which checks that the cached info of push and pull consumers now contain the correctly set field.
If this PR is given the go-ahead, then I'll revert the commit for the nats
module and open a second PR.
@Jarema I've reverted the commit that uses the nats
module.
I had to fumble around with the commit history a bit (might've accidentally included a commit from another contributor?), but this should be fine to merge (when squashed).
Closes #1299
This PR instructs
serde
to renamesample_frequency
intosample_freq
during de/serialization. It also introduces a module for converting theu8
into aString
due to nats-server's handling of the SampleFrequency field.The PR is split into two separate commits, one for
async-nats
and the other fornats
, so that the latter can be reverted if it is not wanted.This PR does not contain any tests, but used the setup from #1299 to check if the field was being correctly set.