Turn off notifications for bulk deletion

Hi ,

Is there a way to not get notifications in certain cases…
For example, if our application is doing bulk deletions for some reason ( through maapi ) , then we also start getting notifications of them which we dont want.

Is there a cdb api to do bulk deletion ?? And then make sure that we dont get notifications on the subsock.

Thanks ,
Rishi

There is no way to only get some operations but not others in your CDB subscription, you will get all changes in the tree where you have subscribed.

If you are doing bulk deletes using the MAAPI interface, one thing you can consider doing in your CDB subscriber is to do a cdb_get_user_session to find out the user session that triggered this change. You can then use maapi_get_user_session to get the structure confd_user_info. Here you can find out the username and context that was used for these set of changes. When you do a bulk delete via MAAPI, and you don’t want to have the CDB subscriber process the changes, you can use a special username or set the context string to some special string when you create the session in your MAAPI code, and then the CDB subscriber can look for this and when it finds it, just call cdb_sync_subscription_socket.