# Operational DB subscription notification without changing operational data

**URL:** <https://dmap-community.ductus.global/t/operational-db-subscription-notification-without-changing-operational-data/4904>\
**Category:** CDB and CDB API\
**Created:** [March 12, 2025, 9:58am UTC](https://dmap-community.ductus.global/t/operational-db-subscription-notification-without-changing-operational-data/4904 "2025-03-12T09:58:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anu](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@Anu](https://dmap-community.ductus.global/u/Anu)\
**Post date:** [March 12, 2025, 9:58am UTC](https://dmap-community.ductus.global/t/operational-db-subscription-notification-without-changing-operational-data/4904/1 "2025-03-12T09:58:30Z")

</div>

Is there a way to generate subscription notification for all writes to operational-db with subscription lock irrespective of whether the value is modified or not?  
Something that can help force-trigger the notification whenever a write is attempted with subscription-lock ?  
Currently it is observed that ConfD suppresses redundant notifications when the value remains the same.

---

<div class="post-metadata">

**Author:** ![sbarvick](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/sbarvick/32/440_2.png) [@sbarvick](https://dmap-community.ductus.global/u/sbarvick)\
**Post date:** [March 14, 2025, 7:15pm UTC](https://dmap-community.ductus.global/t/operational-db-subscription-notification-without-changing-operational-data/4904/2 "2025-03-14T19:15:10Z")

</div>

Hi Anu,

A notification is generated on duplicate writes, but there is nothing in the diff-iterate, as expected. e.g. I modified the cdb\_listener.c from examples.confd/misc/maapi\_command/ to use cdb\_oper\_subscribe() and then print the number of modified values e.g.

```auto
           if (reslen > 0) {
                printf("*** Config updated \n");

                confd_tag_value_t *values;
                int nvalues;
                if (cdb_get_modifications(subsock, sub_points[0], 0, &values, &nvalues,
                          path) == CONFD_OK) {
                  printf("*** nvalues is %d \n", nvalues);
                  for (int i=0; i<nvalues; i++) {
                    confd_free_value(CONFD_GET_TAG_VALUE(&values[i]));
                  }

                }
                cdb_diff_iterate(subsock, sub_points[0], iter,
                                 ITER_WANT_PREV, NULL);
            }

```

```auto
./cdb_monitor
CDB Subscription point = 7
*** Config updated <---- first time
*** nvalues is 1 
Value Set: /op-data --> (op-datay)            
*** Config updated <---- duplicate with no values, but we still get notified
*** nvalues is 0 

```

You may really want to see what is being attempted to be written, or possibly just by whom, given that the data is the same. Other notifications like the authentication notification might help you there.
