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?

Hello,
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"?>
<entity-mappings
        xmlns="http://java.sun.com/xml/ns/persistence/orm"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
        http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
        version="2.0">

    <!-- Axon needs these tables -->

    <schema>axon</schema>
    <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"/>

</entity-mappings>

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”