Hi,
I tried using @Metadata on an @Eventhandler method inside my aggregate, but it is null, while being set after the event is published.
I’m using the config below and add metadata to the commands.
@Bean
public CommandBus commandBus() {
SimpleCommandBus bus = new SimpleCommandBus();
bus.setTransactionManager(new SpringTransactionManager(axonTransactionManager()));
AuditingInterceptor auditingInterceptor = new AuditingInterceptor();
auditingInterceptor.setAuditDataProvider(new CommandMetaDataProvider());
bus.setHandlerInterceptors(Arrays.asList(auditingInterceptor));
return bus;
}
Is this intended?
regards
Geir