apache / apache/pulsar-client-node

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

未关闭
#124 0 条评论 0 个 reaction 已指派 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 摘要。