It may be that in the client that does the put it always triggers "afterCreate" instead of "afterUpdate" on the listener. I know the client that did the operation does not get a subscription event from the server since the server knows the event came from that client. Also I think since the client proxy is always empty it will always look like a create event to it even if it turns out to be an update to an existing key on the server. If you had a caching proxy then the client in which the operation originates may already have the entry so it could be afterCreate or afterUpdate (update if it has that key stored locally). But the non-caching proxies never store anything locally and that is why it would always look like a create.
For events forwarded from a server due to a subscription I think we use the server state to decide what type of event to deliver to the client. I'm not sure about all of this so do some further testing but I hope this helps you proceed. On Mon, Aug 21, 2017 at 7:53 AM, Xu, Nan <[email protected]> wrote: > hi, > > Question about geode streaming. I have a client proxy region local > created this way. > > ClientCacheFactory cacheFactory = new ClientCacheFactory(); > cacheFactory.addPoolLocator(xxx,yyy); > cacheFactory.setPoolMinConnections(4) > .setPoolSubscriptionEnabled(true) > .setPoolThreadLocalConnections((Boolean)GeodeConfig. > getInstance().getConfig().get("pool-threadlocal-connection")); > > ClientCache clientCache = cacheFactory.create(); > ClientRegionFactory<String, byte[]> regionFactory = clientCache. > createClientRegionFactory(ClientRegionShortcut.PROXY); > region = regionFactory.addCacheListener( > cacheListener).create("rep_region"); > > > and my listerner. > > > public class SimpleCacheListener extends CacheListenerAdapter { > @Override > public void afterUpdate(EntryEvent event) { > processor.addEvent(event); > } > } > > When I use this region put and listener at different JVM, everything works > fine. The afterUpdate get triggered, but when I use the same region but > pub and sub at one JVM (different thread), the callback not get triggered > at all. Is there a setting for it? and reasoning for this? > > Thanks, > Nan > > ---------------------------------------------------------------------- > This message, and any attachments, is for the intended recipient(s) only, > may contain information that is privileged, confidential and/or proprietary > and subject to important terms and conditions available at > http://www.bankofamerica.com/emaildisclaimer. If you are not the > intended recipient, please delete this message. >
