Is there a way to manipulate the order of executing the registered XAResources within a transaction for quarkus? In my scenario I have a database datasource and an ActiveMQ resource within the XA transaction configured. For me it seems that there is no defined order which resource is handled first and which last during the two-phase-commit.
My issue is that sometimes the final commit is done first to the messaging system, so that event of service A is published before the database has finished it's final commit - the event is handled by another service B that tries to fetch data from service A - in rare cases service B receives data from service A that is of state before event publishing cause final commit of two-phase-commit on db is still in progress.
IMO the best solution would be to handle the ActiveMQ resource always as second (or last) resource within the two-phase-commit.