10 Comments
User's avatar
Saurabh Dashora's avatar

Great approach Raul.

Reminds me a bit of a Strangler-Fig-like approach only with events involved for a gradual migration. One risk is that the adapter becomes a permanent component. For this, I'd suggest keeping a hard deadline at some point when it will be decommissioned.

Also, thanks for the mention brother!

Raul Junco's avatar

That's a great point, Saurabh; the risk of a "temporary fix" is a reality.

A hard deadline with a follow-up is a must!

Petar Ivanov's avatar

That's a great article, Raul! And thank you for the mention!

Raul Junco's avatar

Thanks, Petar!

Keep them coming.

Mike's avatar

I like this. Typically I’ve made the message backwards compatible or, for major changes, updated the consumers to accept both formats before updating the producers.

This is a simple way to decouple all of it.

Now just need to make sure the consumers get updated and we don’t get stuck with the adapter forever.

Raul Junco's avatar

Exactly, Mike.

Backward compatibility is my favorite approach. As you mentioned, I like this approach because I don't need to deal with the producer anymore, so consumers can now change at their own pace.

Thanks!

Mike's avatar

I like this. Typically I’ve made the message backwards compatible or, for major changes, updated the consumers to accept both formats before updating the producers.

This is a simple way to decouple all of it.

Now just need to make sure the consumers get updated and we don’t get stuck with the adapter forever.

Daniel Moka's avatar

A solid breakdown my friend! Keep these bangers coming!

Raul Junco's avatar

Thanks, Daniel!!!

Harsha Vardhan's avatar

Consumer1 has read till message number 10 from the old topic.

Now, Consumer1 is migrated, and meanwhile message 11, message 12, message 13 are produced to the new topic.

Now, how does Consumer1 read the messages from message 11 from the new topic?