Hi,
first, sorry to spam with (so) many threads, but it seems more manageable to split problems per specific topic. Hey, bounded contexts right?
I’m playing with a MongoEventStorageEngine configuration and a tracking event processor in a spring bootified playground.
Here’s my config:
@Bean public MongoEventStorageEngine eventStorageEngine() { return new MongoEventStorageEngine(new DBObjectXStreamSerializer(), null, mongoTemplate(), new DocumentPerEventStorageStrategy()); } @Bean public MongoTemplate mongoTemplate() { return new DefaultMongoTemplate(mongo(), "axondb"); } @Bean public MongoClient mongo() { MongoClientURI clientURI = new MongoClientURI("mongodb://xxx:yyy@localhost"); return new MongoClient(clientURI); } @Bean TokenStore tokenStore() { return new MongoTokenStore(mongoTemplate(), new DBObjectXStreamSerializer()); }
``` @Autowired public void configureProcessors(EventHandlingConfiguration configuration) { // Let's not go parallel just yet configuration.usingTrackingProcessors( c -> c.getComponent(TrackingEventProcessorConfiguration.class, () -> TrackingEventProcessorConfiguration.forSingleThreadedProcessing()), c -> new SequentialPerAggregatePolicy()); } ```
I have a specific @EventHandler:
@EventHandler public void on(MyDomainEvent event) { doSomethingNifty(); }
This setup actually works, until we add dependency:
``` runtime "org.springframework.boot:spring-boot-devtools" ```
Somehow all my MyDomainEvent messages get ignored (message-monitor reportIgnored() is hit). Looks like the payload of the message (MyDomainEvent) does not match with the payloadType in the AnnotatedMessageHandlingMember (which is actually the same - but different classloaders?). With subscribing event processors it works just fine.
Any ideas?
Thanks.