Any way to add prefix for those tables used internally by Axon?

For those domain event store table, as well as saga entry, etc. Is it possible that I can add a prefix to all those tables? I was testing if I can host multiple microservices using the same database. Any suggestions?

I would suggest looking at the different EventStorageEngine implementations (eg. JDBC/JPA). A quick look lead me to AbstractEventTableFactory/EventSchema classes. HTH

In the case of Hibernate, it can be done by creating a file in src/main/resources/META-INF/orm.xml

<?xml version="1.0" encoding="UTF-8"?>

    <!-- Axon needs these tables -->

    <entity class="org.axonframework.eventsourcing.eventstore.jpa.DomainEventEntry"/>
    <entity class="org.axonframework.eventsourcing.eventstore.jpa.SnapshotEventEntry"/>
    <entity class="org.axonframework.modelling.saga.repository.jpa.AssociationValueEntry"/>
    <entity class="org.axonframework.eventhandling.tokenstore.jpa.TokenEntry"/>
    <entity class="org.axonframework.modelling.saga.repository.jpa.SagaEntry"/>


This example will put the tables inside “axon” schema. But tag contains a table argument so you can set custom table names. Or you could also implement a custom naming strategy class where you just add a prefix for every entity of package “org.axonframework”