Uh oh!
There was an error while loading. Please reload this page.
Improve asynchronous producer with more options for creation and send - #280
Conversation
BewareMyPower
commented
Dec 24, 2025
76c5bff to
dcc82feCompareThere was a problem hiding this comment.
Pull request overview
This PR enhances the asyncio producer API with additional configuration options and message sending capabilities to align with the synchronous producer API. It adds support for message properties, routing keys, delayed delivery, flush operations, and exposes producer metadata methods.
Key changes:
- Extended
Producer.send()with parameters for properties, partition/ordering keys, sequence IDs, replication settings, and delayed delivery - Added
Producer.flush()method for asynchronous batch flushing - Exposed producer metadata via
topic(),producer_name(), andlast_sequence_id()methods - Enhanced
Client.create_producer()with comprehensive configuration options including batching, compression, encryption, access modes, and message routing
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tests/asyncio_test.py | Added tests for producer name/topic retrieval, keyed message sending with properties, and flush functionality with batching validation |
| src/producer.cc | Added Python binding for flush_async method to enable asynchronous flush operations |
| pulsar/asyncio.py | Extended Producer class with send options, flush method, and metadata accessors; enhanced Client.create_producer() with comprehensive configuration parameters matching the synchronous API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Fixes#261