Hi,
From your source code, I can see that the QueryCursor was created
inside startContinuousQuery. Then you return it from that method, but
don't store it in any variable:
continuousQueryHelper.startContinuousQuery(ignite,qry,testCache,subscribeParameters.callBackList,outputFieldsList);
for (int i =0; i <100000; i++) {
LOGGER.info("ListenerClient running... i=" + i); try {
Thread.sleep(20000); }catch (Exception e) {
//Ignore this block }
}
My guess is that your QueryCursor instance can be collected by the GC
within those 20 seconds, and I think that in this case, your query can
be canceled. As the result you see only some part of updates.
Can you please re-create your code according to the example:
https://github.com/gridgain/gridgain/blob/master/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheContinuousQueryExample.java
And try one more time.
BR,
Andrei
1/20/2021 1:36 PM, VeenaMithare пишет:
Hi Andrei,
Please find a trimmed down version of the code attached.
Have a look at the ContinuousQueryHelper -> setInitialQuery to check how the
initial query has been coded.
regards,
Veena.
InitialQueryProject.zip
<http://apache-ignite-users.70518.x6.nabble.com/file/t2757/InitialQueryProject.zip>
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/