apache / apache/pulsar-client-python

The ArgumentError of the 'replication_clusters' in producer.send method in python pulsar.

オープン
#46 コメント 3 件 リアクション 0 件 担当者 1 名 @BewareMyPower が担当を希望しています GitHub で見る
主要言語
Python
スター
75
フォーク
53
PR マージ指標
30日以内にマージされた PR はありません

説明

I want to use the geo-replication in python pulsar and my code is below.

```
client = pulsar.Client("pulsar://localhost:6650")
producer = client.create_producer("python_topic_00", schema=StringSchema())
producer.send("Message0", replication_clusters=["cluster1", "cluster2"])
```

The error message is :

```
Traceback (most recent call last):
File "tests/test_pulsar_producer.py", line 8, in
producer.send("Message0", replication_clusters=["cluster1", "cluster2"])
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pulsar/__init__.py", line 786, in send
replication_clusters, disable_replication, event_timestamp)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pulsar/__init__.py", line 879, in _build_msg
mb.replication_clusters(replication_clusters)
Boost.Python.ArgumentError: Python argument types in
MessageBuilder.replication_clusters(MessageBuilder, list)
did not match C++ signature:
replication_clusters(pulsar::MessageBuilder {lvalue}, std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >)
```

What is the correct data format of the replication_cluster argument.

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

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

評価

この issue はまだ評価されていません。

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

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