Hi Dharam,

Would you be able to provide more information?  From the provided code, I
am unable to determine why/how a duplicate create event is being sent.  It
doesn't look like that should be happening.  Is there a reason why you are
removing the value in the cqListener?  I would assume that ends up invoking
another cq event back to the listener but as a destroy?

-Jason

On Mon, Dec 12, 2016 at 4:18 AM, Thacker, Dharam <
[email protected]> wrote:

> Hi Team,
>
>
>
> I am facing strange issue with Cq listener.
>
> As sown below, same event is sent to cq listener client 2 times. Could
> someone help me to spot if anything wrong here?
>
>
>
> Steps I follow,
>
>
>
> *Rest Service:*
>
>
>
> // create event from client via web service
>
> eventTemplate.put(event.getUuid(),event);
>
>
>
> *Cqlistener:*
>
>
>
> *public* *void* handleEvent(CqEvent cqEvent){
>
>               *if*(cqEvent.getBaseOperation().isCreate()) {
>
>                      logger.info("Event received with BaseOperation: {},
> EventKey: {}", cqEvent.getBaseOperation(), cqEvent.getKey());
>
>
>
>                      EVent event = (Event)cqEvent.getNewValue();
>
>                      logger.info("Event : {}",print(event));
>
>                      gemfireTemplate.remove(event.getUuid());
>
>               }
>
> }
>
>
>
>
>
> <gfe:cq-listener-container id=*"cqListenerContainer"* cache=
> *"client-cache"*>
>
>               <gfe:listener ref=*"XXXEventListener"* query=*"SELECT *
> FROM /Event"*/>
>
> </gfe:cq-listener-container>
>
>
>
> [cqListenerContainer-1] INFO  c.j.r.d.c.XXXEventListener Event received
> with BaseOperation: CREATE, EventKey: 0980abd4-5293-4b9b-98e7-2b8ace18c5e8
>
> [cqListenerContainer-1] INFO  c.j.r.d.c. XXXEventListener Event :
> <Event><Uuid>0980abd4-5293-4b9b-98e7-2b8ace18c5e8</Uuid></Event>
>
> [cqListenerContainer-1] INFO  c.j.r.d.c. XXXEventListener Event received
> with BaseOperation: CREATE, EventKey: 0980abd4-5293-4b9b-98e7-2b8ace18c5e8
>
> [cqListenerContainer-1] INFO  c.j.r.d.c. XXXEventListener Event :
> <Event><Uuid>0980abd4-5293-4b9b-98e7-2b8ace18c5e8</Uuid></Event>
>
>
>
> Thanks & Regards,
>
> Dharam
>
>
>
> This email is confidential and subject to important disclaimers and
> conditions including on offers for the purchase or sale of securities,
> accuracy and completeness of information, viruses, confidentiality, legal
> privilege, and legal entity disclaimers, available at
> http://www.jpmorgan.com/pages/disclosures/email
>

Reply via email to