Hi Geode Users,

Together with my friends I'm trying to setup a simple Native Client (C++)
and Server configuration.
We decided to use Continuous Query (CQ) and overwrite onEvent() method to
have an easy way to be informed about the updates in the database.
So far so good, everything works as expected.

But the main reason we are doing all of this is to have two or more such
setups - all connected using Geode Multisite (WAN).
We successfully created Multisite configuration, we can see (with gfsh
commands) that if something is written to SiteA, it is being replicated to
SiteB.
After reading the documentation, it also became obvious that we must
provide a way to serialize objects before they are sent over the network.
We decided that the simplest way should be to inherit from PdxSerializable
class.

Unfortunately, we ran into a problem that we can't get rid of:
[error 2020/06/25 16:44:36.344952 CEST geodeA:3604 139864301352704]
Exception while receiving subscription event for endpoint geodeB:40404::
apache::geode::client::IllegalStateException: Unregistered type in
deserialization

The exception is visible if the event comes from a remote (SiteB) source.
If we update the database locally on SiteA we have normal onEvent()
invocation in ClientA,
but the exception is present on ClientB connected to SiteB.

We register our type using
cache.getTypeRegistry().registerPdxType(Order::createDeserializable);
We tried to have only the first client to register the type, only the
second client, or both of them, but that didn't seem to change anything.
We also tried to toy with setPdxReadSerialized(true) but to no avail.

Have you met this exception before?
Do you have any CQ+Multisite implementation examples?


Thank you
Regards
Mateusz

Reply via email to