TargetAggregateIdentifier | Use ValueObject

Hello Group,

Is it possible to use a Value Object as the TargetAggregateIdentiier.

I mean something like this:

public class ProductId(){

private String id;

public ProductId(String id){ = id;


I tried that and the value was serialized as a hash like this “org.example.domain.ProductId@31bc8ccb”

I’m using axon 2.4.4 with mongo db as event srtore.

try to override toString method and return ony id:

@Override public String toString(){ return; }