Both the local listener and remote filter will return BinaryObjects as long as the continuous query was registered with the "cache.withKeepBinary()" option set.
However, there is a trick you can use in the implementation of the local listener. Just call "deserialize()" method on the instance of a received binary object: https://github.com/GridGain-Demos/ignite-learning-by-examples/blob/master/complete/src/main/java/org/gridgain/examples/App4ContinousQueries.java#L76 - Denis On Tue, Jul 21, 2020 at 9:21 AM Devakumar J <mail2jdevaku...@gmail.com> wrote: > Hi, > > I am trying to register CQ with transformer with keep binary option and > trying to return a cutom defined object. I see the transformer properly > creating custom object and returning properly. > > But at the same time local listener is not receiving the custom object, > instead i think it received binary object. How can i ensure that local > listener is receiving custom object properly. > > ContinuousQueryWithTransformer<BinaryObject, BinaryObject, ListenerEvent> > continuousQueryWithTransformer = new ContinuousQueryWithTransformer<>(); > > I want local listener to receive ListenerEvent (Custom defined object) as > below: > > continuousQueryWithTransformer.setLocalListener(cacheEntryEvents -> > cacheEntryEvents.forEach(listenerEvent -> { > LOG.info("Event Received : {}", listenerEvent);} > > But local listener throws BinaryObject cant cast to ListenerEvent. > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >