Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Allow to specify MQTTv5 subscription options (#697) #698

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ecarrara
Copy link

This PR adds support to specify subscription options in MQTTv5 client while subscribing. See #697.

BREAKING: v5 client subscribe methods:

- pub async fn subscribe<S: Into<String>>(&self, topic: S, qos: QoS) -> Result<(), ClientError> {
+ pub async fn subscribe(&self, filter: Filter) -> Result<(), ClientError> {

Type of change

New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • Formatted with cargo fmt
  • Make an entry to CHANGELOG.md if it's relevant to the users of the library. If it's not relevant mention why.

Create `FilterBuilder` to build `Filter` using the
builder pattern.

Closes bytebeamio#697
@ecarrara ecarrara changed the base branch from subscription-options to main August 28, 2023 01:42
@brianmay
Copy link
Contributor

I think this PR has the same issue I mentioned in #697. It is not possible to call retain_forward_rule because RetainForwardRule is in a private mod, and it is not possible to construct a value outside of this crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants