Closed BewareMyPower closed 6 months ago
Master issue: https://github.com/apache/pulsar-client-python/issues/55
Introduce a pulsar.asyncio module that includes the asynchronous APIs to work with Python asyncio module.
pulsar.asyncio
Example:
async def main(): client = Client('pulsar://localhost:6650') try: producer = await client.create_producer('topic') msg_id = await producer.send('msg'.encode()) await producer.close() except PulsarException as e: error = e.error() await client.close()
The creation of Client reuses the same keyword arguments from pulsar.Client but the options for creating producer and sending messages are not added yet.
Client
pulsar.Client
Master issue: https://github.com/apache/pulsar-client-python/issues/55
Modifications
Introduce a
pulsar.asyncio
module that includes the asynchronous APIs to work with Python asyncio module.Example:
The creation of
Client
reuses the same keyword arguments frompulsar.Client
but the options for creating producer and sending messages are not added yet.