Mobility
Mobility

Reputation: 3305

Can non_persistent messages sync between master and slave in activemq master_slave mode with zookeeper?

guys, I set up a activeMQ cluster following http://activemq.apache.org/replicated-leveldb-store.html. It works fine with persistent message. But I find that non_persistent messages won't sync from master to slave. Is there any way to solve this?

Upvotes: 0

Views: 109

Answers (1)

Petter Nordlander
Petter Nordlander

Reputation: 22279

The simple answer is to use persistent messages if you want them to survive a failover.

Non persistent messages are not expected to survive broker failovers and the system should not rely on them being there.

Typical scenarios for non persistent messages are

  • Periodic updates with high frequency where the last message has the current status (i.e. stock exchange rates, time before the bus arrives to a stop etc)
  • Messages with a (short) expiry time
  • Messages that can be resent in case of timeout. Typical with request/response - if no response arrives within X seconds, request again.
  • Unimportant data such as real time statistics that you can live without.

The benefit is performance as the message does not have to be synced with slaves, does not have to be stored on disk etc. you will have way higher troughput.

Upvotes: 1

Related Questions