How transaction id is generated by ConfD

is it per transaction or per data socket or per node ?

One transaction identifier per transaction.

In that case how to handle below mentioned scenrio:
Step 1. APP1 and APP2 subscribe different nodes A and B respectively.
Step 2. Now A gets changed APP1 get this transaction and store transaction id.
Step 3. APP1 face disconnection
Step 4. B get changed, hence new transaction Id is generated.
Step 5. APP1 reconnect to ConfD Server and gets new transaction id which is different from the previous stored with APP1. now APP1 will refresh A even if it is not changed.

Step 5. APP1 reconnect to ConfD, get the transaction id list, and notice that there is 1 new new transaction id.
Step 6 APP1 have a separate thread call “cdb_replay_subscriptions()” with the subscription id that APP1 has for its subscription.

Since no changes has been done for the node that APP1 subscribe to, no subscription event to the APP1 subscriber id will be issued by ConfD. APP1 now know that it is in sync with the latest transaction id.

$ pwd
/Users/tailf/confd-6.4/examples.confd/intro/1-2-3-start-query-model
$ confd_cmd -d -d -c 'mset /dhcp/maxLeaseTime "1S"'
mset "/dhcp/maxLeaseTime" "1S"
TRACE Connected (maapi) to ConfD
TRACE MAAPI_START_USER_SESSION  --> CONFD_OK
TRACE MAAPI_START_TRANS  --> CONFD_OK
TRACE MAAPI_SET_ELEM2 /dhcp/maxLeaseTime --> CONFD_OK
TRACE MAAPI_APPLY_TRANS  --> CONFD_OK
TRACE MAAPI_STOP_TRANS  --> CONFD_OK
TRACE MAAPI_END_USER_SESSION  --> CONFD_OK
$ confd_cmd -d -d -c 'mset /dhcp/maxLeaseTime "2S"'
mset "/dhcp/maxLeaseTime" "2S"
TRACE Connected (maapi) to ConfD
TRACE MAAPI_START_USER_SESSION  --> CONFD_OK
TRACE MAAPI_START_TRANS  --> CONFD_OK
TRACE MAAPI_SET_ELEM2 /dhcp/maxLeaseTime --> CONFD_OK
TRACE MAAPI_APPLY_TRANS  --> CONFD_OK
TRACE MAAPI_STOP_TRANS  --> CONFD_OK
TRACE MAAPI_END_USER_SESSION  --> CONFD_OK
$ confd_cmd -d -d -d -c "subwait /dhcp/defaultLeaseTime 1"
subwait "/dhcp/defaultLeaseTime" "1"
TRACE Connected (cdb) to ConfD
TRACE CDB_SUBSCRIBE /dhcp/defaultLeaseTime
 8-May-2017::09:21:29.723 43661/7fffca3bb3c0/3 SEND op=32 isrel=0 th=-1 {1,0,[dhcp,defaultLeaseTime]}
 8-May-2017::09:21:29.723 43661/7fffca3bb3c0/3 GOT 7
 --> CONFD_OK
TRACE CDB_SUBSCRIBE_DONE  --> CONFD_OK
$ confd_cmd -d -d -c "get_replay_txids"
get_replay_txids
TRACE Connected (cdb) to ConfD
TRACE CDB_GET_REPLAY_TXID  --> CONFD_OK
txid[0] 1494-227041-503111
txid[1] 1494-226988-764026
$ confd_cmd -d -d -c "replay_subscriptions 7"
replay_subscriptions "7"
TRACE Connected (cdb) to ConfD
TRACE CDB_GET_REPLAY_TXID  --> CONFD_OK
TRACE CDB_REPLAY_SUBS  --> CONFD_OK

Subscriber with subid 7 is not triggered since the changes did not affect the /dhcp/defaultLeaseTime node