apache / apache/pulsar-client-node
Understanding in client how validation works when we define any schema in producer
- Lingua principale
- C++
- Stelle
- 164
- Fork
- 98
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia con l’esempio esistente di producer-schema.js e la chiamata producer.send mostrata nell’issue. Riproduci l’invio con enforceValidation abilitato usando il comando pulsar-admin fornito, quindi verifica il comportamento corrispondente sul lato consumer. Il lavoro è completo quando il comportamento del client è confermato e il risultato di validazione previsto è chiaramente documentato o tracciato come bug.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, nodejs
- Ambito
- backend, stream-processing
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100