Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

partition and notification

hi, i have a space with a notifier that writes an object to a space. when i partioning the space to 2 the notification service launched twice and creates 2 objects in the space. it happens because the same notification service launch in each partition.

is there a best-practice how to avoid it so only one partition will get notified?

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2737]{quote}

asked 2008-11-26 10:13:19 -0600

sabag2 gravatar image

updated 2013-08-08 09:52:00 -0600

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted


If an object is written to one of the partitions why u get double notifications?

Is the writer is remote or embedded?
Is the notified client is remote or embedded?

How your notify registration done? Do you have the cluster config replicate/trigger notify used?


answered 2008-11-26 10:32:19 -0600

shay hassidim gravatar image
edit flag offensive delete link more



I'll try to explain it better -

i got two pu.xml files, one creates Space A and the other creates space B. space B is partitioned to 2 . Space B got reference for Space A using "jini:...". Space B got notifications from Space A. When notification appears (something happened at space A) both parititioned spaces (B1 & B2) launched their notification processor and handle the object.

My problem is that i want only 1 notification processor to launch, not both of them. Why? because im creating new object in space B upon the notified object from space A, and because of the partitioning i got two new objects, not one.

sabag2 gravatar image sabag2  ( 2008-11-26 12:49:39 -0600 )edit

If you have multiple clients registering for notifications you can't send the notifications to one of them. Both of them will get the notification. Still - Here are 2 options you might want to take a look at: - Take on Notify - http://www.gigaspaces.com/wiki/displa... - Notify Filter - http://www.gigaspaces.com/wiki/displa... - see NotifyDelegatorFilter


shay hassidim gravatar image shay hassidim  ( 2008-11-26 13:50:58 -0600 )edit

thanks shay, these links are very helpfull...

another question, if i'll use polling container, will it do the same like takeOnNotifiy? or will it also be called twice (for every partition).

sabag2 gravatar image sabag2  ( 2008-11-26 23:47:04 -0600 )edit

Yep. Polling container will be called once. There will be a single take for each object.

That's one of the biggest differences between notify and polling container. notifications send to multiple consumers , take operation conducted with a single consumer.


shay hassidim gravatar image shay hassidim  ( 2008-11-27 09:44:49 -0600 )edit


Try to deploy notifier as a separate PU.


answered 2008-11-26 10:31:31 -0600

venkatg gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2008-11-26 10:13:19 -0600

Seen: 73 times

Last updated: Nov 26 '08