ayeo-flex-org / pulsar-flex

Pulsar Flex is a modern Apache Pulsar client for Node.js, developed to be independent of C++.
MIT License
45 stars 9 forks source link

moved consumer's stateChangeHandler out of constructor #83

Closed sOfekS closed 2 years ago

sOfekS commented 2 years ago

setting the consumer's stateChangeHandler should be more flexible, setting it inside the consumer's constructor does not fit all use cases and limits its usability. This PR moves it outside the consturctor into a property so it can be accessed anytime during the consumer's existence.