apache / pekko-connectors

Apache Pekko Connectors is a Reactive Enterprise Integration library for Java and Scala, based on Reactive Streams and Apache Pekko.
https://pekko.apache.org/
Apache License 2.0
64 stars 32 forks source link

mqtt-streaming: fix flaky 'duplicate publish given two client connections' test #456

Closed raboof closed 9 months ago

raboof commented 9 months ago

It appears the flakiness was caused by the two connections using the same connection id for different connections in the same session. I'm not intimately familiar with this codebase, but AFAICS it seems this connection id is an internal concern to the component, and not an MQTT concept. I think we should probably provide an API that does not bother the user with this concept at all, and manages non-overlapping connection ids entirely internal to the component - filed #457. I don't get the impression that it was the purpose of the test to test the behaviour in case of overlapping connection ids.

Fixes #454

This PR still fails due to #458 but #460 suggests it should be OK when combined with #459.

(note the diff is much simpler than it looks, use the 'Hide whitespace' under the cog in the diff view to ignore the indent change)