-
Notifications
You must be signed in to change notification settings - Fork 494
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
Update mqtt proxy to broker #876
Update mqtt proxy to broker #876
Conversation
Previous comment is in #874 . Sorry for inconvince... |
Codecov ReportBase: 76.10% // Head: 75.63% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #876 +/- ##
==========================================
- Coverage 76.10% 75.63% -0.47%
==========================================
Files 110 114 +4
Lines 12698 13221 +523
==========================================
+ Hits 9664 10000 +336
- Misses 2490 2645 +155
- Partials 544 576 +32
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…ss instance conflict, optim resend time interval, and other updates based on comments
@@ -71,6 +71,9 @@ type ( | |||
ConnectionLimit *RateLimit `json:"connectionLimit" jsonschema:"omitempty"` | |||
ClientPublishLimit *RateLimit `json:"clientPublishLimit" jsonschema:"omitempty"` | |||
Rules []*Rule `json:"rules" jsonschema:"omitempty"` | |||
BrokerMode bool `json:"brokerMode" jsonschema:"omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to enable the broker model by default because:
- The backward-compatible, users can upgrade to the broker model by default, they needn't update their specs.
- Broker model has more extensive use cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am more prefer not to enable it because previous users can upgrade it and the behavior of MQTTProxy stays unchanged unless they update their spec... But I am open to update it.
this pr is to make
MQTTProxy
support broker mode by setbrokerMode
true in spec. OriginalMQTTProxy
only publish messages to backendKafka
. Now,MQTTProxy
not only publish message to Kafka but also send messages to the subscribed clients directly.Main changes:
cachedTopicManager
: it contains topic and mqtt client mapping information from all easegress nodes.SessionCacheManager
: it contains all session information for all mqtt clients from all easegress nodes and updatecachedTopicManager
.broker
: watch etcd changes and updateSessionCacheManager
.