mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 11:24:44 -07:00
MQTT streams are special in that we do not set subjects in the config since they capture all subjects. Otherwise, we would have been forced to create a stream on say "MQTT.>" but then all publishes would have to be prefixed with "MQTT." in order for them to be captured. However, if one uses the "nats" tool to inspect those streams, the tool would fail with: ``` server response is not a valid "io.nats.jetstream.api.v1.stream_info_response" message: (root): Must validate one and only one schema (oneOf) config: subjects is required config: Must validate all the schemas (allOf) ``` To solve that, if we detect that user asks for the MQTT streams, we artificially set the returned config's subject to ">". Alternatively, we may want to not return those streams at all, although there may be value to see the info for mqtt streams/consumers. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
55 KiB
55 KiB