apache / apache/pulsar-client-node

Allow BigInt/Buffer to be used as initialSequenceId and/or sequenceId

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

説明

Hello there,

Right now the producer's sequence ID is limited to 4 bytes here:

- https://github.com/apache/pulsar-client-node/blob/master/src/ProducerConfig.cc#L76
- https://github.com/apache/pulsar-client-node/blob/master/src/Message.cc#L174

However we could allow 8 bytes integers if we allow producer/message to receive a [BigInt](https://nodejs.org/api/n-api.html#n_api_napi_get_value_bigint_int64) and/or a [8 bytes buffer](https://nodejs.org/api/buffer.html#buffer_buf_writebigint64le_value_offset).

I'm trying to match a dataset that uses 8 bytes integers for keys as my sequence ID, that's why I found this limitation :-)

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

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

調査の方向性

まず、src/ProducerConfig.cc#L76 と src/Message.cc#L174 のシーケンス ID の処理、およびそれらの値を使用する producer と message のインターフェースを確認します。BigInt と 8 バイトの Buffer 入力をどのように受け入れるべきかを判断し、8 バイトのシーケンス ID を切り捨てずに渡せることと、既存の 4 バイトの動作が引き続きサポートされることを検証します。

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

評価

技術スタック
cpp, javascript, node.js
領域
api, backend, distributed-systems
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
43/100

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

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