You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by if...@apache.org on 2020/07/29 15:12:11 UTC

[rocketmq-client-python] branch master updated: add set_instance_name function for producer

This is an automated email from the ASF dual-hosted git repository.

ifplusor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-python.git


The following commit(s) were added to refs/heads/master by this push:
     new 9a38c43  add set_instance_name function for producer
9a38c43 is described below

commit 9a38c4314abbc290396c75de28054898214c3d3f
Author: sicklife <tu...@gmail.com>
AuthorDate: Wed Jul 29 22:12:57 2020 +0800

    add set_instance_name function for producer
---
 rocketmq/client.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/rocketmq/client.py b/rocketmq/client.py
index 7d2ce0c..106e321 100644
--- a/rocketmq/client.py
+++ b/rocketmq/client.py
@@ -230,6 +230,9 @@ class Producer(object):
     def set_group(self, group_name):
         ffi_check(dll.SetProducerGroupName(self._handle, _to_bytes(group_name)))
 
+    def set_instance_name(self, name):
+        ffi_check(dll.SetProducerInstanceName(self._handle, _to_bytes(name)))
+
     def set_name_server_address(self, addr):
         ffi_check(dll.SetProducerNameServerAddress(self._handle, _to_bytes(addr)))