streamnative / pulsar-rs

Rust Client library for Apache Pulsar
Other
363 stars 120 forks source link

Unable to cleanly close a consumer without unsubscribing from a topic #279

Closed klaatu01 closed 1 year ago

klaatu01 commented 1 year ago

The current behaviour of TopicConsumer::close also unsubscribes from a topic.

In my organisation, we use pulsar as an event broker between bounded contexts, our topics are persistent, and subscriptions are meant for long-term consumption and should outlive the clients consuming from them.

After digging through both the GoLang client and Java client it seems like neither of these perform and unsubscription on close.

I can make a PR to either fix this or add a new function for closing without unsubscribing.

tisonkun commented 1 year ago

Closed by https://github.com/streamnative/pulsar-rs/pull/278.

Releasing 6.0.0 for this one..

tisonkun commented 1 year ago

Released as https://crates.io/crates/pulsar/6.0.0. Thank you @klaatu01!