This release includes 17 new KIPs, adding new features and functionality across Kafka Core, Kafka Streams, and Kafka Connect:
Highlights include:
In a new video, Danica Fine provides a summary of the latest updates and new features in this Apache Kafka release! Watch it here ➡️ YouTube.
You may have gotten an error like this while using the Apache Flink Table API:
Invalid primary key 'PK\_id'. Column 'id' is nullable.
Martijn Visser has you covered with the syntax to create a non-nullable column!
Got your own favorite Stack Overflow answer related to Flink or Kafka? Send it in to devx_newsletter@confluent.io!
Today’s terminal tip is actually a code tip! Adding delivery reports to the producers you create with the confluent-kafka client will significantly improve your experience when you’re running code from your terminal.
First, define a delivery report function:
def delivery_report(err, event):
if err is not None:
print(f'Delivery failed on reading for {event.key().decode("utf8")}: {err}')
else:
print(
f'Device reading for {event.key().decode("utf8")} produced to {event.topic()}'
)
Then, pass the function as a callback argument when you produce the message:
producer.produce(
topic=topic,
key=string\_serializer(key),
value=avro\_serializer(
message\_data, SerializationContext(topic, MessageField.VALUE)
),
on\_delivery=delivery\_report,
)
This ensures that confirmation is printed to your terminal when things are going well:
Device reading for 09 produced to messages\_5
And that errors are printed when things are not going well:
Delivery failed on reading for 89: KafkaError{code=UNKNOWN\_TOPIC\_OR\_PART,val=3,str="Broker: Unknown topic or partition"}
In the above case, this is the error you would get when producing to a topic name that is not in, or known, by the cluster.
Hybrid:
In-person:
We hope you enjoyed our curated assortment of resources! If you’d like to provide feedback, suggest ideas for content you’d like to see, or you want to submit your own resource for consideration, email us at devx_newsletter@confluent.io!
If you’d like to view previous editions of the newsletter, visit our archive.
If you’re viewing this newsletter online, know that we appreciate your readership and that you can get this newsletter delivered directly to your inbox by filling out the sign-up form on the left-hand side.
P.S. If you want to learn more about Kafka, Flink, or Confluent Cloud, visit our developer site at Confluent Developer.
We will only share developer content and updates, including notifications when new content is added. We will never send you sales emails. 🙂 By subscribing, you understand we will process your personal information in accordance with our Privacy Statement.