You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by SINORCHIAN Remus Alex <re...@socgen.com> on 2018/07/13 15:09:40 UTC

Does event listener keep the order of events as they occur on the cluster?

Hello all,

Is there a way to keep the order of events as they happen on the server, when subscribing an Event Listener to Ignite? For example I want an Ignite client to be notified if there is an update made on a specific cache (using EVT_CACHE_OBJECT_PUT); in this case I'm interested to keep the order of events on the local listener (if key 1 was updated after key 0, I want to see the updates in the same order on the Ignite client where I have the event listener subscribed).

If it's not doable with event listeners , can you suggest another way?

Thanks.

=========================================================

Ce message et toutes les pieces jointes (ci-apres le "message")
sont confidentiels et susceptibles de contenir des informations
couvertes par le secret professionnel. Ce message est etabli
a l'intention exclusive de ses destinataires. Toute utilisation
ou diffusion non autorisee interdite.
Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE
et ses filiales declinent toute responsabilite au titre de ce message
s'il a ete altere, deforme falsifie.

=========================================================

This message and any attachments (the "message") are confidential,
intended solely for the addresses, and may contain legally privileged
information. Any unauthorized use or dissemination is prohibited.
E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any
of its subsidiaries or affiliates shall be liable for the message
if altered, changed or falsified.

=========================================================

RE: Does event listener keep the order of events as they occur on the cluster?

Posted by xero <mp...@gmail.com>.
Hi,
It is not mandatory to provide a filter. 
For example, this will get all the events from "myCache"

ContinuousQuery<Integer, BinaryObject> qry = new ContinuousQuery<>();
qry.setLocalListener(new MyEventListener());
myCache.withKeepBinary().query(qry);

@IgniteAsyncCallback
private class MyEventListener implements CacheEntryUpdatedListener<Integer,
BinaryObject> {
@Override
 public void onUpdated(Iterable<CacheEntryEvent&lt;? extends Integer, ?
extends BinaryObject>> evts) {
 	// Do what you want here
 }
}



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

RE: Does event listener keep the order of events as they occur on the cluster?

Posted by SINORCHIAN Remus Alex <re...@socgen.com>.
Hello,

For continuous queries I understand that I need to provide a filter (the query) , but I want to get all the updates (put operations) for a specific cache (not just some that pass a filter). Is this possible?

Thank you,
Remus


Sent with BlackBerry Work (www.blackberry.com)
________________________________
From: vkulichenko <va...@gmail.com>
Sent: Jul 13, 2018 21:42
To: user@ignite.apache.org
Subject: Re: Does event listener keep the order of events as they occur on the cluster?

You should use continuous queries for this:
https://apacheignite.readme.io/docs/continuous-queries. They provide exactly
once notification semantics with ordering guarantees.

-Val



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
=========================================================

Ce message et toutes les pieces jointes (ci-apres le "message")
sont confidentiels et susceptibles de contenir des informations
couvertes par le secret professionnel. Ce message est etabli
a l'intention exclusive de ses destinataires. Toute utilisation
ou diffusion non autorisee interdite.
Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE
et ses filiales declinent toute responsabilite au titre de ce message
s'il a ete altere, deforme falsifie.

=========================================================

This message and any attachments (the "message") are confidential,
intended solely for the addresses, and may contain legally privileged
information. Any unauthorized use or dissemination is prohibited.
E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any
of its subsidiaries or affiliates shall be liable for the message
if altered, changed or falsified.

=========================================================

Re: Does event listener keep the order of events as they occur on the cluster?

Posted by vkulichenko <va...@gmail.com>.
You should use continuous queries for this:
https://apacheignite.readme.io/docs/continuous-queries. They provide exactly
once notification semantics with ordering guarantees.

-Val



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/