# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

# Writers consume through the broker's stream-backed path; this file only
# selects topic filters. Use slash-delimited MQTT-style filters (`+`, `#`)
# for both NATS and FluxMQ builds.
# To listen on all writer topics use the default value "writers/#".
# To subscribe to specific topics use values starting with "writers/" and
# followed by a subtopic (e.g. ["writers/<channel_id>/sub/topic/x", ...]).
["subscriber"]
topics = ["writers/#"]

[transformer]
# SenML or JSON
format = "senml"
# Used if format is SenML
content_type = "application/senml+json"
# Used as timestamp fields if format is JSON
time_fields = [{ field_name = "seconds_key", field_format = "unix",    location = "UTC"},
               { field_name = "millis_key",  field_format = "unix_ms", location = "UTC"},
               { field_name = "micros_key",  field_format = "unix_us", location = "UTC"},
               { field_name = "nanos_key",   field_format = "unix_ns", location = "UTC"}]
