# Restrict issuing default value to daemon

**URL:** <https://dmap-community.ductus.global/t/restrict-issuing-default-value-to-daemon/739>\
**Category:** CDB and CDB API\
**Created:** [September 27, 2016, 4:33pm UTC](https://dmap-community.ductus.global/t/restrict-issuing-default-value-to-daemon/739 "2016-09-27T16:33:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yi\_z\_zhao](https://avatars.discourse-cdn.com/v4/letter/y/45deac/32.png) [@yi\_z\_zhao](https://dmap-community.ductus.global/u/yi_z_zhao)\
**Post date:** [September 27, 2016, 4:33pm UTC](https://dmap-community.ductus.global/t/restrict-issuing-default-value-to-daemon/739/1 "2016-09-27T16:33:22Z")

</div>

Hi,  
I subscribe (two-phase type) a leaf that has default value, and I only want to receive notification when the leaf is explicitly configured by end user.  
I have tried CONFD\_DAEMON\_FLAG\_NO\_DEFAULT, but it does not work. It seems that this flag only works on confd\_init\_daemon, confd\_connect, so cannot be used in the two-phase subscribe case, in which the other set of APIs - confd\_init, cdb\_connect, cdb\_subscribe2 are used.  
Is there a way I can use to make ConfD send notification to the subscriber only when its subscribed leaf is explicitly set? In other words, if the subscribed node has default value, I want the ConfD would not trigger notification to the subscriber if this node is not explicitly set.

---

<div class="post-metadata">

**Author:** ![waitai](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/waitai/32/436_2.png) [@waitai](https://dmap-community.ductus.global/u/waitai)\
**Post date:** [September 29, 2016, 4:35am UTC](https://dmap-community.ductus.global/t/restrict-issuing-default-value-to-daemon/739/2 "2016-09-29T04:35:54Z")

</div>

What mechanism are you using to read the changes from CDB? Are the leaves that have default values inside or outside of a list?

With cdb\_diff\_iterate, you will always get default values of leaves in a list in your subscription notification when a list instance is getting created. The rationale being that the default values don’t have to be known to your instrumentation code ahead of time and will be communicated during the notification process. One of the mechanisms that I’m aware of that won’t send you default values as part of the notification is cdb\_get\_modifications\_cli( ).
