nats-io / nats.rs

Rust client for NATS, the cloud native messaging system.
Apache License 2.0
980 stars 159 forks source link

Add public constructor for Acker #1232

Closed AbstractiveNord closed 3 months ago

AbstractiveNord commented 3 months ago

In some cases manual Acker creation is preferable, than usage .split method. That's public fn constructor introduction.

Jarema commented 3 months ago

Thanks for the PR!

Can you elaborate on use case for this?

AbstractiveNord commented 3 months ago

Thanks for the PR!

Can you elaborate on use case for this?

Instead of split method, I use

let Message { subject, payload, .. } = message;

but without constructor I can't create Acker manually.