Define your AVRO schema and create a Pulsar Schema object: Schema.AVRO(MyClass.class) (Java) or Schema.AVRO(schema_definition) (Python).
Create a producer with schema: client.newProducer(Schema.AVRO(MyClass.class)).topic('...').create(); Pulsar registers the schema automatically on first produce.
Set the schema compatibility strategy on the namespace or topic: pulsar-admin namespaces set-schema-compatibility-strategy --compatibility BACKWARD tenant/namespace. Options include BACKWARD, FORWARD, FULL, ALWAYS_COMPATIBLE (verify exact option names in current Pulsar docs).
When evolving the schema, add optional fields with defaults (BACKWARD compatible) so old consumers can read new messages. Removing fields or changing types may require FORWARD or FULL strategy adjustments.
Inspect registered schemas: pulsar-admin schemas get persistent://tenant/namespace/topic.
Known gotchas
Schema enforcement is per-topic; a producer with an incompatible schema will fail at connection time, not at message send time.
ALWAYS_COMPATIBLE disables schema checks entirely; use only in development environments.
Pulsar's schema registry stores schemas per topic subject; using the same schema class across topics registers them independently with no cross-topic compatibility enforcement.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp