Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
pulsar
提交
49a8658c
pulsar
项目概览
apache
/
pulsar
通知
129
Star
40
Fork
3
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
pulsar
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
49a8658c
编写于
10月 28, 2019
作者:
B
Brian Candler
提交者:
Matteo Merli
10月 28, 2019
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add is_read_compacted to create_reader() in python API (#5483)
Fixes #5365
上级
c59a37b2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
1 deletion
+8
-1
pulsar-client-cpp/python/pulsar/__init__.py
pulsar-client-cpp/python/pulsar/__init__.py
+8
-1
未找到文件。
pulsar-client-cpp/python/pulsar/__init__.py
浏览文件 @
49a8658c
...
...
@@ -594,6 +594,8 @@ class Client:
* `broker_consumer_stats_cache_time_ms`:
Sets the time duration for which the broker-side consumer stats will
be cached in the client.
* `is_read_compacted`:
Selects whether to read the compacted version of the topic
* `properties`:
Sets the properties for the consumer. The properties associated with a consumer
can be used for identify a consumer at broker side.
...
...
@@ -663,7 +665,8 @@ class Client:
reader_listener
=
None
,
receiver_queue_size
=
1000
,
reader_name
=
None
,
subscription_role_prefix
=
None
subscription_role_prefix
=
None
,
is_read_compacted
=
False
):
"""
Create a reader on a particular topic
...
...
@@ -711,6 +714,8 @@ class Client:
Sets the reader name.
* `subscription_role_prefix`:
Sets the subscription role prefix.
* `is_read_compacted`:
Selects whether to read the compacted version of the topic
"""
_check_type
(
str
,
topic
,
'topic'
)
_check_type
(
_pulsar
.
MessageId
,
start_message_id
,
'start_message_id'
)
...
...
@@ -718,6 +723,7 @@ class Client:
_check_type
(
int
,
receiver_queue_size
,
'receiver_queue_size'
)
_check_type_or_none
(
str
,
reader_name
,
'reader_name'
)
_check_type_or_none
(
str
,
subscription_role_prefix
,
'subscription_role_prefix'
)
_check_type
(
bool
,
is_read_compacted
,
'is_read_compacted'
)
conf
=
_pulsar
.
ReaderConfiguration
()
if
reader_listener
:
...
...
@@ -728,6 +734,7 @@ class Client:
if
subscription_role_prefix
:
conf
.
subscription_role_prefix
(
subscription_role_prefix
)
conf
.
schema
(
schema
.
schema_info
())
conf
.
read_compacted
(
is_read_compacted
)
c
=
Reader
()
c
.
_reader
=
self
.
_client
.
create_reader
(
topic
,
start_message_id
,
conf
)
...
...
tester丶
🤺
@ssszwink
mentioned in commit
153d190a
·
9月 09, 2020
mentioned in commit
153d190a
mentioned in commit 153d190aed731529be2ddf65830fe028a2dbf2b0
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录