In Apache Pulsar, schemas define the format and structure of your messaged. This makes data safer, easier to validate and ensures compatibility across producers and consumers.
Whether you're starting fresh or evolving your data model, managing schemas should be simple. In this guide, we walk you through creating and updating schemas via the UI, without writing any CLI commands.
To get started, open the Explorer page. This is your main starting point for interacting with your Pulsar environment.
Once you are on the Explorer page, you'll see a list of tenants, the logical groups that help organize your messaging infrastructure. Each tenant contains one or more namespaces, which in turn contain the actual topics where your messages live.
Here’s a quick path through the structure:
This clear hierarchy ensures you always know exactly where you are in the system.
Once you’ve selected a topic, you’ll land on its overview page. This page gives you general information about the topic, such as its configuration and metrics.
Head over to the Schema tab and click on the Create Schema button.
Select the format of your choice and use the editor to paste or write your schema definition.
Once you're done, click on Confirm to create the schema.
Once saved, you will be able to see the current schema definition and some more information, like the schema version on the page.
Once a schema is set for a topic, it will act as a contract for all producers and consumers that connect to it. This helps avoid accidental format mismatches, missing fields, or invalid data structures.
If your data needs to evolve, you can update the schema. Pulsar will check if the schemas are compatible to keep your consumers safe.
To update, return to the Schema tab and click on the Edit Schema button.
In the editor, modify the existing definition to fit your needs, then click on Confirm to submit your changes.
The new schema version will become visible on the page.
Tip: If you want to compare changes across schemas, you can select an older schema version from the Version dropdown to look at its definition.
Schemas in Pulsar are your first line of defense against bad data and broken integrations. Managing them through the UI is fast, safe and flexible.
Try it out next time you create a new pipeline, change your message payload, or just want peace of mind that your structure is solid!