Propagate tracking event processor between microservices

Imagine that I have two microservices (person and driverslicense).

On person microservice I have the PersonCreatedEvent. Every PersonCreatedEvent I put it on rabbitMQ to every microservices capture this information and persist it into Person table.

On driverslicense microservice I get PersonCreatedEvent and put into Person table in order be independent (eventually consistent).

I´m trying to recreating events (deleting token) using Tracking event processor on person microservice but I see that only Person table inside person microservice is updated. How can I propagate the events during tracking event processor to rabbitMQ?

I´m using:

  • Axon 3.3
  • Spring Boot
  • RabbitMQ
  • MongoDB to EventStore
  • Postgres to RDMS.

Tracking Event Processor config:

@Autowired
public void configure(EventProcessingConfiguration config) {
config.usingTrackingProcessors();
}

Thanks,
Gustavo.

Hi,

tracking processors are not compatible with RabbitMQ, meaning that a Tracking Processor (which is able to “reset”) cannot read messages from RabbitMQ. That’s because once Rabbit delivers a message, it’s removed from the queue.
Theoretically, you could create a tracking processor that publishes events to Rabbit, basically republishing them when a reset happens. I would strongly discourage you from doing that, as it is likely to create problems in the future, when multiple components will be reading from Rabbit.

If a components needs to be able to reset, it should be a Tracking Processor and read from a StreamableMessageSource (generally the Event Store).

Hope this clarifies things.
Cheers,

Allard

Hi Allard,

Thanks a lot for your reply. It helped a lot.