nats-io / nats.js

Apache License 2.0
45 stars 4 forks source link

OrderedConsumerOptions.filterSubjects should be OrderedConsumerOptions.filter_subjects #85

Open Zambito1 opened 4 months ago

Zambito1 commented 4 months ago

Observed behavior

This is the only field on the object that does not use snake case. It also does not match the nearly identical ConsumerConfig object, which has a field named filter_subjects as well as filter_subject. I switched from using the Jetstream Manager API to the Jetstream Client API, and this difference tripped me up, as my undefined filterSubjects field led to my filter being ignored.

Expected behavior

Consistent casing

Server and client version

Library version v1.27.0

Host environment

N/A

Steps to reproduce

N/A

aricart commented 3 months ago

If it is a model option - as the configs for consumer/stream then they match the model - because it is sent as is to the server. On client API options it uses camel case - I will revisit for the 3.0 release I am working on as this would be an API change, but for certain it should be consistent.