Nictec commented on code in PR #228:
URL:
https://github.com/apache/pulsar-client-python/pull/228#discussion_r1866594726
##########
pulsar/asyncio.py:
##########
@@ -116,6 +123,190 @@ async def close(self) -> None:
self._producer.close_async(functools.partial(_set_future, future,
value=None))
await future
+ async def flush(self):
+ """
+ Flush all the messages buffered in the client and wait until all
messages have been successfully persisted.
+
+ Raises
+ ------
+ PulsarException
+ """
+ future = asyncio.get_running_loop().create_future()
+ self._producer.flush_async(functools.partial(_set_future, future,
value=None))
+ await future
+
+ @property
+ def is_connected(self) -> bool:
+ """
+ Check if the producer is connected or not.
+ """
+
+ return self._producer.is_connected()
+
+ @property
+ def last_sequence_id(self) -> int:
+ """
+ Get the last sequence id
+ """
+ return self._producer.last_sequence_id()
+
+ @property
+ def name(self) -> str:
+ """
+ Get the name of the producer.
+ """
+ return self._producer.producer_name()
+
+ @property
+ def topic(self) -> str:
+ """
+ Get the topic name of the producer.
+ """
+ return self._producer.topic()
+
+
+class Consumer:
+ # BUG: schema stuff doesn´t work at all because 90% of the methods are
missing
Review Comment:
This was resolved in
[https://github.com/Nictec/pulsar-client-python/commit/656a287da2794ee4760baf9a09d53352f8f8520b](https://github.com/Nictec/pulsar-client-python/commit/656a287da2794ee4760baf9a09d53352f8f8520b).
I simply forgot to remove the comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]