Skip to content

Commit 590937f

Browse files
rnpridgeonRyan P
authored andcommitted
Update confluent_cloud.py
1 parent 4884c37 commit 590937f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/confluent_cloud.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
def acked(err, msg):
6666
"""Delivery report callback called (from flush()) on successful or failed delivery of the message."""
6767
if err is not None:
68-
print("failed to deliver message: {0}".format(err.str()))
68+
print("failed to deliver message: {}".format(err.str()))
6969
else:
70-
print("produced to: {0} [{1}] @ {2}".format(msg.topic(), msg.partition(), msg.offset()))
70+
print("produced to: {} [{}] @ {}".format(msg.topic(), msg.partition(), msg.offset()))
7171

7272

7373
p.produce('python-test-topic', value='python test value', callback=acked)
@@ -101,11 +101,11 @@ def acked(err, msg):
101101
# the group to rebalance and start consuming.
102102
continue
103103
if msg.error():
104-
# Most error message are typically temporary log error and continue.
104+
# Errors are typically temporary, print error and continue.
105105
print("Consumer error: {}".format(msg.error()))
106106
continue
107107

108-
print('consumed: {0}'.format(msg.value()))
108+
print('consumed: {}'.format(msg.value()))
109109

110110
except KeyboardInterrupt:
111111
pass

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy