Skip to content

add MQTT support#6

Merged
Lance-Drane merged 7 commits intomainfrom
4-mqtt-support
Sep 9, 2025
Merged

add MQTT support#6
Lance-Drane merged 7 commits intomainfrom
4-mqtt-support

Conversation

@Lance-Drane
Copy link
Copy Markdown
Contributor

This adds MQTT support to the proxy server/client while also maintaining AMQP support. This necessitated refactoring the application to utilize several protocol-based traits, but the refactor should make it easier to add additional protocols as necessary.

Configuration

adds an additional protocol field to the config file (both client and server) under the broker section, use either amqp or mqtt.

Resiliency

The MQTT protocol should act similar to the AMQP protocol:
- if unable to connect to the broker on startup, terminate the application immediately. Likely indicates incorrect credentials
- if disconnected from the broker as part of normal application flow, keep the application alive so it can potentially reconnect to the broker.

Limitations

The current MQTT implementation will always auto-acknowledge messages. This is different from the AMQP implementation, where we manually acknowledge messages (we requeue messages which didn't get through due to a server-side error, and accept all other messages). The MQTT implementation should be resilient enough, but messages which fail to propagate to the other proxy will be lost.

MQTT currently just a stub

Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
@Lance-Drane Lance-Drane self-assigned this Sep 8, 2025
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@marshallmcdonnell marshallmcdonnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I'm learning Rust more and more :) Thank you!

Merge whenever you are ready

@Lance-Drane Lance-Drane merged commit 597c063 into main Sep 9, 2025
4 checks passed
@Lance-Drane Lance-Drane deleted the 4-mqtt-support branch September 9, 2025 13:44
@Lance-Drane Lance-Drane mentioned this pull request Sep 9, 2025
2 tasks
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.

2 participants