Pivotal Knowledge Base

Follow

Durable Subscription or Continuous Query Events not Received While Using Spring Data GemFire

Environment

Pivotal GemFire Versions 7.0.1.x,702.x, 8.0.0.x, 8.1.0.x,8.2.0.x, and 8.2.1.x

Symptom

If clients are not receiving subscription events or CQ events, even after restarting the client or after restarting a client durable events are not received with Spring data gemfire.

Cause

The cause is basically clientCache.readyForEvents(). It is called before all the registerInterest and cq initializations are done. The sequence should:

ClientCache clientCache = ClientCacheFactory.create(); 
// Here, create regions, listeners that are not defined in the cache.xml . . .
// Here, run all register interest calls before doing anything else
clientCache.readyForEvents(); 

Resolution

Make sure that the *clientCache.readyForEvents()* is called after all the registerInterest() and cq initializations has been done. This can be acheived by setting:

*ready-for-events="false"*
<gfe:client-cache properties-ref="gemfire-props" ready-for-events="false" />

in the spring client configurations and manually calling *clientCache.readyForEvents()* after all the reqisterInterest() and cq initializations have been done.

Comments

Powered by Zendesk