Defines options for individual publications.

Hierarchy

  • ClientPublishOptions

Properties

dropIfOffline?: boolean

Determines whether a publication should be dropped if the client is currently offline due to a broken connection (optional).

By default, any offline publication is queued until the client reconnects.

Remarks

Use this option to disable offline buffering for individual publications. For example, regular high frequency state messages on the VDA 5050 "visualization" topic should be dropped while offline as they would be outdated and create a spam wave if published later.

retainMessage?: boolean

Determines whether to retain the published MQTT message at the MQTT broker (optional).

If not specified, the value defaults to false.

Generated using TypeDoc