Rafa
10/30/2023, 3:25 PMOrderRequested
message.
In Pact, the code of the providers has to be merged first, and the code of the consumer after it. This makes sense to me but I'm struggling to see if it also makes sense for event-driven architecture. If we merged Basket Service
first, there would be errors (or at least a queue of messages) because Payment Service
, the consumer, doesn't understand the new changes introduced by the provider.
For me, in this case, we would introduce some code to the consumer to be able to handle both the old and new versions of the OrderRequested
message, and after that, we'd merge the code to Basket Service
.
How would you handle this scenario, please?
Was it clear enough?
Thanks!Vittorio Guerriero
10/31/2023, 12:14 PMVittorio Guerriero
10/31/2023, 12:14 PMRafa
11/02/2023, 9:20 AMPayment service
so that it understands both the old and the new version of the OrderRequested
message.
How would we deal with breaking changes in general?Vittorio Guerriero
11/02/2023, 10:10 AMVittorio Guerriero
11/02/2023, 10:12 AMRafa
11/02/2023, 1:24 PMOrderRequested
and OrderRequestedV2
, then it'd be hard to ensure that only one of them is handled if PaymentService is deployed in a "RollingUpdate" mode.
Do you see any way of improving this flow?Vittorio Guerriero
11/02/2023, 5:13 PMRafa
11/02/2023, 5:22 PMPaymentService
reacts to OrderRequested
and creates a PaymentProcessed
event but also version 1.13 of PaymentService
reacts to OrderRequestedV2
and also creates a PaymentProcessed
? I was thinking I wouldn't be able to have multiple containers of PaymentService
being upgraded 1 by 1 (the RollingUpdate strategy) because of this reason 🤔