HiveMQ Extensions and Data Hub: The Catalogue and How It Fails
HiveMQ Data Hub: Policies, Schemas and Transformations
HiveMQ Data Hub explained: data and behaviour policies, JSON Schema and Protobuf validation, JavaScript transformations, the Sparkplug module and limits.
HiveMQ Data Hub decides what happens to an MQTT message after it arrives at the broker and before anyone receives it: is it the shape we agreed, is the client behaving, does it need converting, and should it be delivered or dropped. This page covers the policy types, schema validation, transformations, the Sparkplug module, where it runs, and where it gets hard. It is current as of November 2026 and built from HiveMQ’s Data Hub documentation. It sits under extensions and Data Hub in the HiveMQ hub.
HiveMQ Data Hub policies
There are two kinds of policy, and they match on different things. A data policy matches messages by topic filter. A behaviour policy matches clients, and models how a client acts over its connection lifetime.
Data policies. HiveMQ’s documentation says validation checks whether your data sources “are sending data in the data format you expect”. A policy applies validators, and an on-failure pipeline decides the outcome. The documentation’s example drops a message that fails validation and logs a warning. Valid or invalid messages can also be rerouted to other topics, which is how a plant keeps a quarantine topic to inspect bad data instead of discarding it.
Behaviour policies. HiveMQ’s documentation describes three predefined behaviour models: MQTT Events, Publish Duplicate and Publish Quota. Its function list names the actions log, count, disconnect and drop. A client that publishes the same message in a loop, or exceeds a publish quota, can be handled at the broker instead of in the client.
How they are managed. HiveMQ’s documentation has Control Center and REST API sections for policies and schemas, and a Scripts section in the Control Center for transformations. Data Hub is switched on in config.xml with the data-hub and rest-api settings enabled.
Schema validation
HiveMQ’s pages name two schema formats: JSON Schema and Protobuf. Avro is not mentioned on the pages we read. The broker ships Avro libraries (a 2024 security notice for an Apache Avro issue shows that), but a library in the broker does not prove Avro schema support in Data Hub, so we do not claim it. If your producers emit Avro, ask HiveMQ in writing.
In our view, schemas are the part of Data Hub that pays off first in a plant. A Unified Namespace fails quietly when one gateway changes a tag name or a type. A JSON Schema on the topic tree turns that into a logged rejection on day one rather than a wrong number in a historian next month. See the Unified Namespace guide for the namespace design behind this.

Transformations
Transformations are JavaScript. HiveMQ’s documentation describes a scripting function with an entry function named transform, and serialise and deserialise actions that convert between a schema-described format and a JavaScript object. A transformation runs inside a data policy, so the same policy can validate, convert and deliver.
Typical uses are renaming fields, converting units, adding a timestamp, and flattening a nested payload. In our view, keep transformations small and stateless. Business logic belongs in the system that owns the business rule, not in a script on the broker.
The Sparkplug module
HiveMQ states that its Data Hub Sparkplug module (hivemq-sparkplug, under Data Hub, Modules in the Control Center) converts Sparkplug Protobuf payloads to JSON without code. HiveMQ also lists metric fan-out to configurable topics, a customisable topic prefix, schema validation that can drop or log non-conforming messages, and tracking of invalid Sparkplug B messages (HiveMQ blog, 27 November 2024). The documentation pages we read do not state which edition includes the module, and the use-case page lists no Sparkplug-specific features. Treat the module as something to confirm in writing.
Without the module, HiveMQ’s own two-part blog (August 2024) builds a Sparkplug pipeline by hand: a Protobuf schema, a JSON schema, a JavaScript transformation and a data policy. That is the pattern to know even if you buy the module. For Sparkplug itself, see HiveMQ and Sparkplug.
| Task | Without the module | With the module, as HiveMQ describes it |
|---|---|---|
| Decode Sparkplug Protobuf | Protobuf schema plus a transformation | Built-in conversion to JSON |
| Split metrics to topics | Your own JavaScript | Metric fan-out to configured topics |
| Reject bad Sparkplug messages | A policy you write and maintain | Validation that drops or logs, with tracking |
| Edition required | Not applicable | Not stated on the pages we read |
Where Data Hub runs
The question for a plant is placement. Validation at a central broker catches bad data once it has already crossed the WAN. Validation at the edge catches it at the source.
On the broker, Data Hub is part of the HiveMQ Enterprise MQTT Broker and is enabled in its configuration. On HiveMQ Edge, Data Hub is a commercial feature behind a licence key, and the trial is not available there. HiveMQ’s Edge 2026.16 notes (10 November 2026) list Data Hub 3.5.0 with a newer script engine that HiveMQ says is up to 15 percent slower for scripts. In our view, the Edge placement is the interesting one for plants: bad data is rejected at the site boundary, before it crosses a WAN link to a central broker.
Where it gets hard
- Free mode is one policy. A namespace with a policy per area needs a licensed mode. HiveMQ’s pricing page lists in-stream data governance in every self-managed plan; confirm the plan limits.
- Scripting prerequisites. HiveMQ’s transformation documentation says Linux scripting needs GLIBC 2.29 or higher, and that scripts must be deleted before scripting is disabled or the broker may fail to start. Test both in a container image you will actually run.
- Schema ownership. A schema is a contract between the gateway author and the consumer. In our view, a schema nobody owns becomes a reason messages are dropped after a firmware update. Version the schemas and log the drops where someone reads them.
- Cost on the hot path. Validation and scripts run per message. We found no HiveMQ throughput figures for Data Hub, so load-test with your payload sizes and message rate.
- Cluster behaviour. The Data Hub page we read does not cover it. Ask how policies are distributed and how ordering is handled before relying on them in a cluster.
- Sparkplug limits remain. HiveMQ’s blog lists Sparkplug’s own constraints, such as QoS 0 and the lack of retained-message support, without saying the module changes them.
A practical rollout is to start with one data policy on one topic branch, log failures for two weeks, read them, and only then switch the on-failure action from log to drop. That avoids discarding good data because the schema was wrong, which is the usual first mistake.
The broker-side basics are on the extensions and Data Hub parent page. A sibling that sends validated data onward is the HiveMQ Kafka extension.
Frequently asked questions
What does HiveMQ Data Hub do?
Data Hub checks and reshapes MQTT messages inside the HiveMQ broker. A data policy matches a topic filter, validates the payload against a schema and then drops, logs or reroutes it. A behaviour policy watches client behaviour such as duplicate publishes. Transformations written in JavaScript change a payload before it is delivered.
Which schema formats does HiveMQ Data Hub support?
HiveMQ's Data Hub documentation names JSON Schema and Protobuf. Avro is not mentioned on the pages we read, although Avro libraries ship in the broker, so we cannot confirm Avro schema support. Ask HiveMQ before you design a pipeline around Avro. The documentation was read on 20 November 2026.
Is HiveMQ Data Hub free?
Partly. HiveMQ's documentation says free mode, included since 4.17, allows a single policy and a limited set of functions, and a 5-hour trial removes the limits. HiveMQ's pricing page lists in-stream data governance in every self-managed plan. On HiveMQ Edge, Data Hub is a commercial feature that needs a licence key and the trial is not available.
Can Data Hub convert Sparkplug B to JSON?
HiveMQ states that its Data Hub Sparkplug module converts Sparkplug Protobuf payloads to JSON without code and can fan metrics out to configurable topics. The pages we read do not state which edition includes the module. Without the module, HiveMQ's own blog builds the same pipeline by hand with schemas, a JavaScript transformation and a data policy.
Where does HiveMQ Data Hub run?
Data Hub runs inside the HiveMQ broker, enabled in the broker configuration along with the REST API, and is managed through the Control Center or the REST API. It also runs on HiveMQ Edge, where it is a commercial feature, so you can validate and reshape data at the plant boundary before it travels.
References and further reading
- HiveMQ Data Hub · HiveMQPolicies, schemas, free mode and the 5-hour trial.
- Data Hub use cases · HiveMQData and behaviour policy examples and actions.
- Data Hub transformations · HiveMQJavaScript scripting and its Linux prerequisites.
- Data Hub module specification · HiveMQ
- Overcoming MQTT Sparkplug challenges for smarter manufacturing · HiveMQHiveMQ's description of the Sparkplug module, 27 November 2024.
- HiveMQ Edge documentation · HiveMQData Hub on Edge as a licensed feature.