Does Axon framework support event down casting?

38 Views Asked by At

As per the document Axon framework does support for event upcasting. But just imagine i want to remove some attributes in next version. Can we do it in Axon framework?

1

There are 1 best solutions below

0
Gerard Klijs On

I would still call that upcasting. Since it's still about a new version. Since you're not stuck on a serializer, and you can pretty much do whatever you want in an upcaster that certainly is possible.

When you use Jackson as serializer, you don't event need an upcaster. You can just configure it to ignore additional data that's not in the class. You can also do renaming with Jackson without needing upcasters, by giving properties an alias.

If you would use Protobuf, as long as the schema's are backwards compatible, you can always add fields, without needing upcasters.

I hope that was helpful.