A Use Case for Transactions: Outbox Pattern Strategies in Spring Cloud Stream Kafka Binder

Engineering | Soby Chacko | October 24, 2023 | ...

Other parts in this blog series

Part 1: Introduction to Transactions in Spring Cloud Stream Kafka Applications

Part 2: Producer Initiated Transactions in Spring Cloud Stream Kafka Applications

Part 3: Synchronizing with External Transaction Managers in Spring Cloud Stream Kafka Applications

Part 4: Transactional Rollback Strategies with Spring Cloud Stream and Apache Kafka

Part 5: Apache Kafka’s Exactly-Once Semantics in Spring Cloud Stream Kafka Applications

In this last part of this blog series, we dive into a relatively new design pattern first proposed by Chris Richardson but seeing it from the perspective of Spring Cloud Stream. We will see what the outbox pattern is, how it works, and a few strategies to adapt when using Spring Cloud Stream and Apache Kafka. See the descriptions here

This Week in Spring - October 24th, 2023

Engineering | Josh Long | October 24, 2023 | ...

Hi, Spring fans! This week I'm in Lisbon, and Porto, Portugal, ahead of the Porto Tech Hub event in Porto, and my tour bus is about to leave! So, let's dive right into it!

This Week in Spring - October 17th, 2023

Engineering | Josh Long | October 17, 2023 | ...

Hi, Spring fans! Welcome to yet another installment of This Week in Spring! It's October 17th, 2023, and I am here in Montreal, Canada, and then I'm off to Salt Lake City, Utah on Thursday for the Java User Group there. Don't miss it!

We've got a lot to cover this week so let's dive right into it!

Runtime efficiency with Spring (today and tomorrow)

Engineering | Sébastien Deleuze | October 16, 2023 | ...

With Spring Framework 6.1 and Spring Boot 3.2 general availability approaching, we would like to share an overview about several efforts the Spring team is pursuing to allow developers to optimize the runtime efficiency of their applications.

We are going to cover the following technologies and use cases:

  • Spring MVC as a lean Virtual Threads web stack on JDK 21
  • Optimized container deployment with Spring and GraalVM Native Image
  • JVM Checkpoint Restore: Scale to zero with Spring and Project CRaC
  • A glimpse into OpenJDK’s future with Spring AOT and Project Leyden

If you prefer watching a video…

Apache Kafka’s Exactly-Once Semantics in Spring Cloud Stream Kafka Applications

Engineering | Soby Chacko | October 16, 2023 | ...

Other parts in this blog series

Part 1: Introduction to Transactions in Spring Cloud Stream Kafka Applications

Part 2: Producer Initiated Transactions in Spring Cloud Stream Kafka Applications

Part 3: Synchronizing with External Transaction Managers in Spring Cloud Stream Kafka Applications

Part 4: Transactional Rollback Strategies with Spring Cloud Stream and Apache Kafka

With the fundamental analysis of how transactions work with Spring Cloud Stream Kafka applications out of the way from our previous discussions in this series, we have finally arrived at the elephant in the room: the exactly-once semantics, a much-discussed and required feature in streaming applications. In this part of this blog series, we look at how you can get exactly-once semantics in Spring Cloud Stream applications via Apache Kafka transactions. The knowledge of how transactions work from the previous sections makes it relatively easy to understand how Spring Cloud Stream Kafka applications achieve…

Transactional Rollback Strategies with Spring Cloud Stream and Apache Kafka

Engineering | Soby Chacko | October 11, 2023 | ...

Other parts in this blog series

Part 1: Introduction to Transactions in Spring Cloud Stream Kafka Applications

Part 2: Producer Initiated Transactions in Spring Cloud Stream Kafka Applications

Part 3: Synchronizing with External Transaction Managers in Spring Cloud Stream Kafka Applications

In the last three sections of this blog series, we analyzed how transactions work in Spring Cloud Stream Kafka applications. We encountered different contexts in which transactions are helpful, including both producer and consumer applications and how an application can correctly use them. Now that those fundamental elements are behind us, let’s move on to another aspect of transactions: rolling back a transaction when an error occurs. When an error occurs and a transactional system cannot commit the transaction, the transaction manager rolls back the transaction and does not persist anything for a downstream consumer to see. It would help if an application could dictate how this rollback mechanism works. Spring Cloud Stream facilitates this rollback…

This Week in Spring - October 10th, 2023

Engineering | Josh Long | October 10, 2023 | ...

Hi, Spring fans! Welcome to another installment of This Week in Spring! Last week I was in Antwerp, Belgium, for the amazing Devoxx Belgium event, and this week I've been in Amsterdam for the SpringOne Tour Amsterdam stop and - in the middle of the SpringOne Tour Amsterdam event - I dipped out to join my friend and fellow Java Champion Trustin Lee (@trustin) (he created Netty! the guy's a living legend!) for a discussion and ask-me-anything at the local Amsterdam Java User Group, hosted by fellow Java Champion and local Geertjan Wielenga (@GeertjanW). It was a lovely day indeed across the two…

Get the Spring newsletter

Thank you for your interest. Someone will get back to you shortly.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all