I connect to a Geode server on another machine using:
CacheFactory cacheFactory = CacheFactory.CreateCacheFactory();
Cache c = cacheFactory
.AddServer("x.x.x.x", 40404)
.SetSubscriptionEnabled(true)
.Create();
RegionFactory regionFactory = c.CreateRegionFactory(RegionShortcut.CACHING_PROXY);
IRegion<string, string> r = regionFactory.Create<string, string>("r");
Now if I try and put an entry then it works. However, if I try and subscribe to events in region r by using:
r.GetSubscriptionService().RegisterAllKeys();
then this throws a NotConnectedException
What am I missing here please? Thanks...
I found that the problem was to do with the CacheFactory.create() setting up a default connection pool behind the scenes, and that default pool may not be compatible with the server connection pool.
So according with connection pool code have to setup a pool factory and set that to receive subscriptions, like:
where MyListener handles the event subscription according to event handling