Pivotal Knowledge Base


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


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


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.


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


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

<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.


Powered by Zendesk