apache / apache/pulsar-client-node
Understanding in client how validation works when we define any schema in producer
- Langage dominant
- C++
- Étoiles
- 164
- Forks
- 98
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez avec l’exemple existant de producer-schema.js et l’appel à producer.send montré dans l’issue. Reproduisez l’envoi avec enforceValidation activé à l’aide de la commande pulsar-admin fournie, puis vérifiez le comportement correspondant côté consommateur. C’est terminé lorsque le comportement du client est confirmé et que le résultat de validation attendu est clairement documenté ou enregistré comme un bug.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, nodejs
- Domaine
- backend, stream-processing
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 30/100