apache / apache/pulsar-client-node

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

オープン
#411 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
164
フォーク
98
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

既存の producer-schema.js の例と、issue に示されている producer.send 呼び出しから始めます。提供された pulsar-admin コマンドを使用して enforceValidation を有効にした状態で送信を再現し、その後、対応する consumer 側の動作を確認します。クライアントの動作が確認され、期待される検証結果が明確に文書化されるか、bug として追跡されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, nodejs
領域
backend, stream-processing
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。