Is it possible to register two or more ReadSideProcessors per service in Lagom, like this:
@Inject
public BlogServiceImpl(
PersistentEntityRegistry persistentEntityRegistry,
ReadSide readSide) {
this.persistentEntityRegistry = persistentEntityRegistry;
readSide.register(CassandraBlogEventProcessor.class);
readSide.register(SolrBlogEventProcessor.class);
}
Yes, you can register as many read-side processors as you need. Note that each one will consume events independently of the others, so you should take care not to assume anything about the order of processing between different read-side processors.