I am using the ActiveMQ KahaDB, the DB is being shared between two hosts on an 
NFS 4.1 mount.

Here is how the NFS mounts are mounted:

    <HOST_NAME>:/data_mount  /Data/BROKER1  nfs 
nfsvers=4.1,soft,timeo=20,retrans=2,lookupcache=none,sync,intr,proto=tcp,noac,acregmin=3,acregmax=3,acdirmin=3,acdirmax=3,sec=sys,rw

Here is some general information on how ActiveMQ is starting and the KahaDB is 
being set:

    <broker xmlns=http://activemq.apache.org/schema/core 
schedulePeriodForDiskUsageCheck="900000" brokerName="BROKER1" start="false" 
deleteAllMessagesOnStartup="false" persistent="true" schedulerSupport="true" 
offlineDurableSubscriberTimeout="86400000" 
offlineDurableSubscriberTaskSchedule="3600000" populateJMSXUserID="true" 
useShutdownHook="false" enableStatistics="true" useJmx="true" 
dataDirectory="${activemq.data}">



    <persistenceAdapter>

        <kahaDB directory="${activemq.data}/kahadb" lockKeepAlivePeriod="2000" 
journalMaxFileLength="100mb" checkForCorruptJournalFiles="true" 
checkpointInterval="5000" checksumJournalFiles="true" 
concurrentStoreAndDispatchQueues="true" journalDiskSyncStrategy="always" 
enableAckCompaction="true">

            <locker>

                <shared-file-locker lockAcquireSleepInterval="10000"/>

            </locker>

        </kahaDB>

    </persistenceAdapter>

The messages are persistent and I see the queue contains messages when the 
broker fails over.  What I am not able to do is browse the messages on the host 
where the broker failed to.

Another bit of information which I do not believe is an issue, the host where 
the broker fails over has a different DNS and IP, meaning the following:

    Host 1 / IP 1 (Master / Slave)

                                Shared KahaDB

    Host 2 / IP 2 (Master / Slave)



Jason Jackson

Senior Manager



Main Office: 703-639-0709

Direct: 202-888-3973

Cellular: 863-370-5324

Fax: 571-431-7618

www.itechag.com<http://www.itechag.com/>



[cid:6aa5e648-fbbd-4106-8844-ce74e4adba23]

________________________________
From: Jean-Baptiste Onofré <[email protected]>
Sent: Tuesday, March 10, 2026 8:23 AM
To: [email protected] <[email protected]>
Subject: Re: ActiveMQ Classic 6.2.1 Master-Slave Usage Question/Observation

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


Hi Jason

If the messages are persistent, they are stored in the storage (KahaDB for
instance), and when a failover happens, you should be able to browse and
see the messages payload.

Can you share more details about your messages ? What store are you using?

Regards
JB

On Tue, Mar 10, 2026 at 1:15 PM Jason Jackson <[email protected]>
wrote:

> Using ActiveMQ Classic 6.2.1 in a Master-Slave environment on two
> different hosts.
>
> The Master-Slave and failover is working exactly like it should be.
>
> I have observed the following.
>
> When the broker is running on HOST1 and is processing data/messages in
> QUEUE1; for whatever reason it fails over to HOST2.  When the failover
> occurred there was data/messages in QUEUE1.  When I access the broker on
> HOST2 I can see that QUEUE1 contains data/messages but I noticed that I am
> not able to see the data/messages, I just see there is a queue depth of X.
> If I fail the broker back to HOST1 I am able to see the messages.
>
> I suspect the reason I am not able to see the data/messages when the
> broker fails over is due to the message header/information containing
> information from HOST1 and now that it is running on HOST2 there is an
> issue and/or it does not recognize them.
>
> I have two questions.
>
>
>   1.
> Is there a setting that can be enabled where the messages are visible on
> HOST2 when a failover occurs?
>   2.
> Even though I can not see the messages would they still be processed on
> HOST2 even though there may be details from HOST1 in the data/messages?
>
> Thank you.
>
>
> Jason
>
>
>

Reply via email to