wireFormat block on a stage lets you configure exactly how that prefix is constructed, giving you compatibility with Confluent Schema Registry and other binary framing conventions without writing any custom serialization code.
The
wireFormat block only applies when the workflow’s contentType is "application/x-protobuf". It has no effect on JSON payloads.What Wire Format Does
A wire format prefix is a short sequence of bytes placed at the front of every outbound binary message. Its purpose is to tell the consumer which schema or message type to use when deserializing the payload. Confluent Schema Registry, for example, expects a 2-byte message type prefix followed by the serialized Protobuf bytes. Without the correct prefix, your consumer will fail to decode the message. Devset supports two strategies for generating the prefix value:messageType— automatically use the type ID derived from the stage’s schema. This is the standard approach for Confluent Schema Registry compatibility.messagePrefix— write a fixed integer value you provide. Use this when your consumers expect a hard-coded identifier rather than a schema-resolved one.
wireFormat Block Fields
The framing strategy to apply. Currently the only supported value is
"binary-prefix", which prepends a fixed-width integer to the serialized payload.The byte length of the prefix. The only accepted value is
2 (two bytes, supporting values 0–65535).How the prefix value is determined.
"messageType"— Devset resolves the type ID from the stage’s schema (viaschemaIdor the workflow-level default) and writes that integer as the prefix. This is the correct setting for Confluent Schema Registry compatibility."messagePrefix"— Devset writes the integer you provide inprefix.valueas the prefix. Use this for consumers with a fixed or manually assigned type identifier.
The fixed prefix value to write. Only used when
prefix.source is "messagePrefix". Must be an unsigned integer in the range 0–65535.Examples
Using messageType — Confluent Schema Registry
This is the most common configuration. Devset resolves the integer type ID from the stage’s schema and writes it as a 2-byte prefix, matching the Confluent Schema Registry wire format:
Using messagePrefix — Fixed Custom Prefix
When your consumers expect a specific hard-coded identifier rather than a schema-resolved one, use messagePrefix and supply the value directly:
0x002A (decimal 42), regardless of the schema ID.
Per-Stage vs Workflow-Level Configuration
ThewireFormat block is configured per stage. This design lets different stages in the same workflow use different framing strategies — for example, one stage publishing with a schema-resolved prefix and another with a fixed custom prefix.
If every stage in your workflow uses identical wire format settings, you can reduce repetition by defining the wireFormat block in a shared stage template or by copying the block consistently across stages. There is no workflow-level wireFormat shorthand today, but per-stage configuration gives you maximum flexibility for mixed-schema pipelines.
Related Pages
- Stage Fields — full reference for the
wireFormatfield and all other stage-level configuration. - Workflow DSL — setting
contentTypeto"application/x-protobuf"at the workflow level.