debug(mqtt): temporary onSubscribe diagnostics [revert]

This commit is contained in:
ArnabChatterjee20k committed 2026-09-17 22:01:46 +05:30
1 parent 8d5e92e288
commit fd05c1224f
1 file changed
+8
+8
View File
@@ -166,6 +166,14 @@ class Handler implements MqttHandler
$grantedTopics[$filter->topic] = [$document, $grantedQos];
}
\Utopia\CLI\Console::error('MQTT_SUB_DBG prefix=' . $connection->prefix
. ' uid=' . ($identity['userId'] ?? '(none)')
. ' roles=' . \json_encode($roles)
. ' filters=' . \json_encode(\array_map(fn ($f) => [$f->topic, $f->qos], $subscribe->filters()))
. ' allowed=' . \json_encode(\array_keys($allowed))
. ' foundTopics=' . \json_encode(\array_keys($topicsById))
. ' codes=' . \json_encode($suback->codes()));
if ($grantedTopics !== []) {
$this->replayBacklog($connection, $projectDB, $grantedTopics);
}