---
title: Sparkplug B Settings
slug: reference/sparkplug-b-settings
docTags: 
createdAt: 2025-09-10T15:04:48.969Z
---

The MQTT Sparkplug B collector connects to a MQTT broker that supports Sparkplug B. It subscribes on the configured topic, which you can set to `spBv1.0/#` if you want to receive all messages. The topic is of the following format for Sparkplug B `namespace/group_id/message_type/edge_node_id/[device_id]`. The best way to configure the topic is to pass a comma separated list of topics containing only the groups, edge nodes or devices you’re interested in.

For every message that the collector receives it will check if there is a corresponding measurement configured and create points. To configure a measurement you need to specify the `group id`, `edge node id`, `device id`(optional) and the `metric name`.

## Measurement discovery and auto-onboarding

The SparkplugB collector can be configured to discover new measurements and optionally to try to automatically onboard them.
Incoming messages that are not yet linked to a measurement are given a default name: `group_id/edge_node_id/device_id/metric_name` and the measurement is added in status `Discovered` if `AutoOnboard` is not enabled. If `AutoOnboard` is enabled and the collector has a default database configured, Factry Historian will attempt to set the newly discovered measurement to status `Active`.
Discovered measurements can be promoted to `Active` by setting a database and optionally changing their name. Enabling `AutoOnboard` on a collector that has a default database also promotes every measurement already in `Discovered` on that collector, not just the ones discovered afterwards.

## Collector settings

Some collector settings are specific to the MQTT Sparkplug B collector.

### DiscoverMeasurements

**Description**: Automatically discover measurements by parsing incoming messages. If enabled, the collector will try to parse incoming messages and create measurements based on the message contents. Currently only supported for SparkplugB messages.

### AutoOnboard

**Description**: Automatically try to onboard discovered measurements using the collector’s Default Database.
**Prerequisites**: The default database has to be configured for the collector, and `DiscoverMeasurements` has to be enabled.

### NameRegexMatcher

**Description**: Change the automatically generated name for discovered measurements by setting this field and `NameRegexReplaceBy`. The regex in this field will be matched with the default name generated by the collector. The capture groups in the regex here can be used to selectively replace (parts of) the generated name.
**Prerequisites**: The rename runs on the auto-onboard path only, so `AutoOnboard` has to be enabled and the collector needs a default database. Without both, discovered measurements keep the raw generated name and these two settings have no effect.

### NameRegexReplaceBy

**Description**: The replacement string to replace the automatically generated name by. Use `$1`, `$2`, …, `$n` to reference capture groups/submatches in the `NameRegexMatcher`

### SendRebirthMessage

**Description**: When enabled, the collector publishes a `Node Control/Rebirth` NCMD to `spBv1.0/<group_id>/NCMD/<edge_node_id>` when it reconnects and whenever a measurement is added, asking the edge node to resend its birth certificate. It is published at the collector's `QOS` with retain off.
**Required**: no
**Default**: true

## Measurement settings

The measurement settings reflect the configuration possibilities for mapping a measurement to a Sparkplug B metric.

:::hint{type="warning"}
The `CollectionType` and `DownsamplingInterval` measurement settings were removed in MQTT collector version 5.0.0. Their behavior is now covered by the noise filter settings on the [base collector](docId\:im-7Bhp1Lmte9WPvndn_Y). Upgrading converts existing values automatically, so there is nothing to change by hand.
:::

### GroupID

**Description**: The group ID, it provides for a logical grouping of MQTT EoN nodes.
**Required**: yes

### EdgeNodeID

**Description**: The edge node ID, it uniquely identifies the MQTT EoN node within the infrastructure.
**Required**: yes

### DeviceID

**Description**: The device ID, it identifies a device attached (physically or logically) to the MQTT EoN node.
**Required**: no

### MetricName

**Description**: The name of the metric.
**Required**: yes

### TagNames

**Description**: Comma separated list of tags to extract.
**Required**: no
