ConfD User Community

Is it possible to uniquely identify a confD transaction?



I have the need to, inside the get_object callback in my code identify the confD transaction uniquely somehow. The pointer to the confd_trans_ctx struct received as a parameter in the callback would be an option if another transaction couldn’t have the same memory address later.

I have noticed, though, that the same confd_trans_ctx struct has as a member one integer called thandle. I have also observed that each time my callback gets called this value changes.

I wonder if every transaction has a different thandle identifier. If so, I could use this value to identify a different transaction. If what I have said is not true, is there a way to identify different transactions through the confd_trans_ctx struct?



Yes, thandle is number that identifies transaction (id), so you can use it.