10
10
class Producer ()
11
11
```
12
12
13
- [[VIEW SOURCE ]](https :// github .com / quixio / quix - streams / blob / main / quixstreams / kafka / producer .py # L45 )
13
+ [[VIEW SOURCE ]](https :// github .com / quixio / quix - streams / blob / main / quixstreams / kafka / producer .py # L65 )
14
14
15
15
< a id = " quixstreams.kafka.producer.Producer.__init__" >< / a >
16
16
@@ -23,10 +23,11 @@ def __init__(broker_address: Union[str, ConnectionConfig],
23
23
logger: logging.Logger = logger,
24
24
error_callback: Callable[[KafkaError], None ] = _default_error_cb,
25
25
extra_config: Optional[dict ] = None ,
26
- flush_timeout: Optional[float ] = None )
26
+ flush_timeout: Optional[float ] = None ,
27
+ transactional: bool = False )
27
28
```
28
29
29
- [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ kafka/ producer.py# L46 )
30
+ [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ kafka/ producer.py# L66 )
30
31
31
32
A wrapper around `confluent_kafka.Producer` .
32
33
@@ -66,7 +67,7 @@ def produce(topic: str,
66
67
on_delivery: Optional[DeliveryCallback] = None )
67
68
```
68
69
69
- [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ kafka/ producer.py# L84 )
70
+ [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ kafka/ producer.py# L117 )
70
71
71
72
Produce a message to a topic.
72
73
@@ -101,7 +102,7 @@ for the produced message.
101
102
def poll(timeout: float = 0 )
102
103
```
103
104
104
- [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ kafka/ producer.py# L145 )
105
+ [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ kafka/ producer.py# L178 )
105
106
106
107
Polls the producer for events and calls `on_delivery` callbacks.
107
108
@@ -122,7 +123,7 @@ Polls the producer for events and calls `on_delivery` callbacks.
122
123
def flush(timeout: Optional[float ] = None ) -> int
123
124
```
124
125
125
- [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ kafka/ producer.py# L153 )
126
+ [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ kafka/ producer.py# L213 )
126
127
127
128
Wait for all messages in the Producer queue to be delivered.
128
129
@@ -139,19 +140,6 @@ None use producer default or -1 is infinite. Default: None
139
140
140
141
number of messages remaining to flush
141
142
142
- < a id = " quixstreams.kafka.producer.TransactionalProducer" >< / a>
143
-
144
- # ## TransactionalProducer
145
-
146
- ```python
147
- class TransactionalProducer(Producer)
148
- ```
149
-
150
- [[VIEW SOURCE ]](https:// github.com/ quixio/ quix- streams/ blob/ main/ quixstreams/ kafka/ producer.py# L184)
151
-
152
- A separate producer class used only internally for transactions
153
- (transactions are only needed when using a consumer).
154
-
155
143
< a id = " quixstreams.kafka.consumer" >< / a>
156
144
157
145
# # quixstreams.kafka.consumer
0 commit comments