Post

3 followers Follow
0
Avatar

Possible empty asyncEventQueue or temporarily disable asyncEventQueue?

We have AsyncEventQueue wired up using spring configuration. Yet we have a need to preload cache when server up. Although I disable AsyncEventListener during preloading. The preloading cache still caused many async events in queue which should be discard.
Do we have a way to empty asyncEventQueue or disable asyncEventQueue?

liqian zou

Please sign in to leave a comment.

3 comments

0
Avatar

You cannot directly manage an AEQ - i.e. stop/start or flush it. The options you do have are to programmatically remove/re-add the AEQ to your region with region.getAttributesMutator().removeAsyncEventQueueId() or your Listener could contain a flag which, when set, simply drops all incoming events (return true without processing the events).

Jens Deppe 0 votes
0
Avatar

Thanks Jens for confirming. I think in the future that will be a good enhancement to add such methods. We use nice spring configuration to wire up things cleanly and just to wipe out the events, we have to code the wires-up manually back.

liqian zou 0 votes
0
Avatar

gfsh has stop/start gateway-sender. Pivotal should consider modifying to support async listeners.  Also, SQLFire/XD allowed for client connections which skipped event listeners  

Joseph 0 votes