This content has been marked as final. Show 2 replies
I observed the same behavior when I configure listener (in cache-config.xml) for backing map scheme or for its local cache. But when I configure listener at the distributed-cache level then listener works asynchronously as expected.
There is a slightly different behavior here between using a "LocalCache" directly and a Distributed Cache.
A local cache is a JVM local object that doesn't start threads of its own to manage callbacks. A Distributed Cache on the other hand has a "Distributed Cache Service" that manages eventlisteners and sends the MapListener callbacks on a different thread.
I'd recommend you to develop using the distributed cache if that is your intended use case long term.