Hi Team,
This is regarding broker less pubsub publisher implementation and I have used examples from open62541 library.
I want to publish two datasets and I want to publish these datasets on event basis. It is similar to “server_pubsub_publisher_on_demand.c” example but in example “server_pubsub_publisher_on_demand.c” the publish API (UA_Server_WriterGroup_publish) was not publishing any data when called inside the “onDemandPublish” call back function for event basis. So I made below mentioned changes in pubsub writerGroup configuration then the publish API (UA_Server_WriterGroup_publish) started to work.
Changes made: In WriterGroup configuration I added “addCustomCallback” and made publishing interval as 0 because I don’t want to publish datasets periodically. Our requirement is event based.

I wanted to publish 2 datasets with event basis so I used “server_pubsub_publisher_iop.c“ example program from open62541 with above configuration and added publish API (UA_Server_WriterGroup_publish) inside “timerCallback” call back function.
Please let me know my approach is correct or do I need to make any changes?
For above implementation I have found few observation and please can you tell me why I have observing these,

So I made promotedField as true then both datasets started to publish but in Wireshark I can see that there are 2 UDP messages transmitting for each dataset.

So my question is,

So my question is,
My updated program is attached for your reference.
Thanks and Regards,
Charanraj O