Share datafiles between two Docker containers running HornetQ Share datafiles between two Docker containers running HornetQ kubernetes kubernetes

Share datafiles between two Docker containers running HornetQ


The behavior you're seeing is expected. Two HornetQ instances cannot (and should not) share the same data concurrently. Since you're pointing both instances at the same directory you've implicitly configured shared-store high availability.

Despite the fact that you say "classic clusters aren't suitable" it seems to me that's exactly what you need in order to share data between the nodes. Clustering and high availability (for failover) are configured independently. If you configure your cluster properly messages should flow between them based on demand. There won't be any failover and each can have their own hostname. You can read more about both clusters and high-availability in the HornetQ documentation.

Lastly, why are you using HornetQ in the first place? The HornetQ code-base was donated to Apache ActiveMQ 5 years ago now and has carried on as the ActiveMQ Artemis broker. HornetQ hasn't had a release since then, but there's been over a dozen releases of ActiveMQ Artemis with lots of bug fixes and new features. I recommend you migrate to ActiveMQ Artemis ASAP.