more complex association properties for the SagaEventHandler

we are using axon core 2.4.2 and are currently investigating the option of using a Java type composed from 2 strings as the association properties for the SagaEventHandler.

The code base examined is quite large prohibiting quick testing.

I find a toString in the code on the association property to create the value.

Is it sufficient to create a property type which overwrites the toString method to make this work?

I cannot quite assess the consequences from what I read so far.
The solution with the association key I found elsewhere is not quite applicable to my situation.

Thanks for any pointers.


Axon 2.4 uses the toString() value to search a specific value in the database. So as long as your toString() provides consistent (and equal when underlying objects are equal) results, you’re fine.



Thanks Allard for the prompt response. Much appreciated :slight_smile: