feat(mqtt): add MQTT listener, client creation, and shutdown wiring
Wire up the MQTT server-side orchestration layer (Task 1 of 7): - Create NatsServer.Mqtt.cs with StartMqttListener(), CreateMqttClient(), MqttAddr() - Forward MqttHandler.StartMqtt() to server.StartMqttListener() - Add _mqttListener to Shutdown() doneExpected counting - Fix ReadyForConnections to recognize active MQTT listener - Handle RandomPort (-1) as ephemeral for MQTT listener - Remove duplicate Mqtt field from ClientConnection.cs (already in ClientConnection.Mqtt.cs) - Add 2 MQTT boot integration tests (accept + shutdown lifecycle)
This commit is contained in:
@@ -1803,7 +1803,7 @@ public sealed partial class ClientConnection
|
||||
// IsMqtt / IsWebSocket helpers (used by clientType, not separately tracked)
|
||||
// =========================================================================
|
||||
|
||||
internal bool IsMqtt() => false; // Deferred to session 22 (MQTT).
|
||||
internal bool IsMqtt() => Mqtt != null;
|
||||
internal bool IsWebSocket() => Ws != null;
|
||||
internal bool IsHubLeafNode() => Kind == ClientKind.Leaf && Leaf?.IsSpoke != true;
|
||||
internal string RemoteCluster() => Leaf?.RemoteCluster ?? string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user