'Outbox' pattern and using streaming processor

Hello,

My team is developing microservices using Spring Boot and Rabbit MQ. In some of our services, we use the Axon framework (without the Axon server). We publish events from such services via axon.amqp.exchange=ExchangeName.

We have a main order-service where we use Axon, and we critically need to have atomicity in writing the order event to the database, and publishing the event to the RabbitMQ. If the connection to RabbitMQ, the connection to the database, or the instance is restarted (or all at once) during order processing, we cannot allow the event from the order-service to get lost and not get to RabbitMQ, but persist in the database.

I studied a little the articles that are present here on the topic of the Outbox template, but I did not see such an option anywhere.

  1. Still, I stopped at the fact that axon.amqp cannot provide 100% event delivery to the RabbitMQ when services/connections fail, am I right?
  2. What if I use a streaming processor and an event handler as an proxy for publishing events to the rabbit manually? That is, in this case, won’t I implement the ‘outbox’ pattern, due to the fact that the token entry table will be used as the same ‘outbox’ table?
  3. In the axon documentation, I did not see any specific recommendations or restrictions on what exactly the event handler can do except write to the database? (from a performance point of view). That is, for example, publishing an event to the rabbit? Sending an HTTP request to another service? How bad is it to do this?