简体   繁体   中英

How to create an alert on Hazelcast replicated map

We have a couple of Hazelcast instances in one cluster and 20 replicated maps in each one. We have also lots of Hazelcast clients that reading data from those replicated maps.

The project has performance criteria so each get operation to map cannot last for more than 2 milliseconds. We want to track that criteria and create alert and interrupt the get operation on each replicated map if it takes more than 2 milliseconds.

However we cannot add timeout to replicated map get operation unlike Imap(it has getAsync). Also we cannot create filter from management center as it does not provide replicated map option as seen in image below:

Hazelcast Management Center警报选项卡

In short, how to create an alert on replicated map and adding timeout programmatically if possible?

You can use com.hazelcast.core.EntryListener on a ReplicatedMap. See here for details: https://docs.hazelcast.org/docs/3.11.1/manual/html-single/index.html#using-entrylistener-on-replicated-map

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM