refactor: improve descriptions and identifiers

Co-authored-by: zmstone <zmstone@gmail.com>
This commit is contained in:
Thales Macedo Garitezi 2024-07-29 09:45:52 -03:00 committed by GitHub
parent 1d56ac6e5e
commit 6786c9b517
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -839,7 +839,7 @@ handle_telemetry_event(_EventId, _Metrics, _MetaData, _HandlerConfig) ->
%% metrics. %% metrics.
-spec telemetry_handler_id(action_resource_id()) -> binary(). -spec telemetry_handler_id(action_resource_id()) -> binary().
telemetry_handler_id(ActionResId) -> telemetry_handler_id(ActionResId) ->
<<"emqx-bridge-kafka-producer-", ActionResId/binary>>. ActionResId.
uninstall_telemetry_handlers(TelemetryId) -> uninstall_telemetry_handlers(TelemetryId) ->
telemetry:detach(TelemetryId). telemetry:detach(TelemetryId).

View File

@ -1 +1,5 @@
Added to possibility to configure a list of predefined Kafka topics to Kafka producer actions, and also to use templates to define the destination Kafka topic. Kafka producer action's `topic` config now supports templates.
The topics must be already created in Kafka. If a message is rendered towards a non-existing topic in Kafka (given Kafka disabled topic auto-creation), the message will fail with an unrecoverable error. Also, if a message does not contain enough information to render to the configured template (e.g.: the template is `t-${t}` and the message context does not define `t`), this message will also fail with an unrecoverable error.
This same feature is also available for Azure Event Hubs and Confluent Platform producer integrations.