Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Understanding in client how validation works when we define any schema in producer

Open
#411 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, nodejs

Research direction

Start with the existing producer-schema.js example and the producer.send call shown in the issue. Reproduce the send with enforceValidation enabled using the provided pulsar-admin command, then check the corresponding consumer-side behavior. Done means the client behavior is confirmed and the expected validation result is clearly documented or tracked as a bug.

Written by the indexing model from the issue text.

Description

in existing example if we see producer-schema.js where we are setting JSON schema for the topic by producer
and let say I enabled enforceValidation from pulsar-admin to true
so now I am expecting if producer is trying to send message which dosent not follow the schema client should throw an error validation failed
for example if producer is trying to send message
producer.send({
data: Buffer.from(JSON.stringify({"a":"testXYZ","b":1})),
});

for topic schema validation is already enabled
with below command

bin/pulsar-admin namespaces set-schema-validation-enforce --enable tenant/namespace

as we can see a should be integer but I am passing string
so I am expecting that pulsar or client should throw validation error instead of sending this message successfully?
same case from consumer side too

Dominant language
C++
Stars
164
Forks
99
Avg merge
5d 18h
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/pulsar-client-node

All issues in apache/pulsar-client-node

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.