Skip to content

Conversation

@andrew-otiv
Copy link

We briefly tested this manually, but I haven't written a test case yet.

@github-actions
Copy link

github-actions bot commented May 2, 2025

PR missing one of the required labels: {'enhancement', 'bug', 'new feature', 'breaking-change', 'documentation', 'dependencies', 'internal'}

@JEnoch
Copy link
Member

JEnoch commented May 7, 2025

Thanks for tackling this issue!
However, I believe a more comprehensive solution is necessary: if there are two MQTT subscribers on the same topic, your PR will remove the Zenoh subscriber (and the route) as soon as one MQTT subscriber leaves. Consequently, the remaining MQTT subscriber will no longer receive publications from Zenoh.

I think the plugin needs to properly track the MQTT subscribers (or at least their count) and unsubscribe from Zenoh only when the last MQTT subscriber for a topic has unsubscribed.

@JEnoch JEnoch added the bug Something isn't working label May 7, 2025
@JEnoch
Copy link
Member

JEnoch commented May 7, 2025

Also, in order to legally accept your PR we will need you to sign the Eclipse Contribution Agreement. Please make sure you use the same email address associated to the GitHub account you used to open this PR.

@milyin
Copy link
Contributor

milyin commented Aug 4, 2025

@andrew-otiv could you please sing the agreement and update the PR to pass code format check (see command line used by CI for formatting)

@andrew-otiv
Copy link
Author

This seems to be a bigger task than I hoped, and I don't have enough understanding of async to deal with the issues the test suite has. The tests in main are no longer running for me, even on main:

On main, without any changes at version:
9eb6c69

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

 Running tests/test.rs (target/debug/deps/test-3eb18bb7b26f3d3b)

running 3 tests
test test_mqtt_pub_zenoh_sub ... ok
test test_mqtt_pub_mqtt_sub ... FAILED
test test_zenoh_pub_mqtt_sub ... FAILED

thread 'tokio-runtime-worker' panicked at zenoh-plugin-mqtt/tests/test.rs:72:10:
called Result::unwrap() on an Err value: Disconnected(Some(Custom { kind: Other, error: "A Tokio 1.x context was found, but it is being shutdown." }))
Panic in Arbiter thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants