Hi , I have enabled replaySupport for one of my stream and enabled ReplaybuiltInsupport, here is the details
[root@60h4lq3 bin]# netconf-console --host=127.0.0.1 --port=2100 --get -x netconf
/usr/local/lib/python3.6/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.
from cryptography.hazmat.backends import default_backend
with this configs, when i am generating notiifcations on this streams seen getting stored in one of the file as well,
also when a new subscription done via netconf-console with start-time
netconf-console --host=127.0.0.1 --port=2100 --start-time=2021-11-29T17:51:46 --create-subscription=file_manager
/usr/local/lib/python3.6/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.
from cryptography.hazmat.backends import default_backend
able to receive notifications which are generated after start_time
I have also have an application which is subscribing to this stream using confd_notiifcation_connect2
here providing start_time also, but not receiving any stream notiifcation as soon my app starts, whatever notifications generating i.e.,“live feed” is received, But replay of stored notifications are not received.
yes followed same example only. In the same i have set start time in my app as well.
In this example confd/misc/notifications/confd_notifications.c is subscribing for an stream with start_time (stream name and start time are arguments) and will start listening to this stream.
As README suggested started this app with mke all start, but here there are no steps mentioned on how to generate notiifcation towards this stream.
You can combine the netconf_notification example that creates the “interface” stream with the confd_notifications application from the misc/notifications example:
Terminal window 1:
$ cd $CONFD_DIR/examples.confd/netconf_notifications
$ make all start built-in
Send a few notifications by typing (followed by enter) , for example, 🇺↩ 🇩↩ 🇮↩ 🇾↩ as the README suggests
Terminal window 2:
$ cd $CONFD_DIR/examples.confd/misc/notifications
$ ./confd_notifications -n "interface" -B "2022-12-01T00:00:00"
Waiting for event notifications...
Notif stream: event at 2022-12-01T18:05:47.737117+00:00
link-up
if-index 1
link-property
flags 2112
link-property
flags 32
Notif stream: event at 2022-12-01T18:05:48.792738+00:00
link-down
if-index 1
Notif stream: event at 2022-12-01T18:05:49.759978+00:00
link-up
if-index 2
link-property
flags 42
link-property
flags 4668
Notif stream: event at 2022-12-01T18:05:50.777124+00:00
link-up
if-index 2
link-property
newly-added
flags 42
extensions
name 1
value 3
extensions
name 2
value 4668
Notif stream: replayComplete
Send some more notifications from terminal window 1 notifier_builtin_replay_store application that will now be received and printed by the confd_notifications application in terminal window 2
Thanks @cohult for detailed steps, i have followed your steps and could able to receive replay of stream notifications on app side with the example $CONFD_DIR/examples.confd/misc/notifications.
however in my code as well i am using same steps to set start time of one my stream, #define YANG_TYPES_URI “urn:ietf:params:xml:ns:yang:ietf-yang-types”
std::string start_time = “2021-11-29T17:51:46”;
if ((dt_type = confd_find_ns_type(confd_str2hash(YANG_TYPES_URI), “date-and-time”)) == NULL)
confd_fatal(“Failed to find yang:date-and-time type definition\n”);
if (confd_str2val(dt_type, start_time.c_str(), &confd_file_stream_dt.start_time) != CONFD_OK)
confd_fatal(“Invalid start time for stream: %s\n”, start_time.c_str());
But it is failing with an error Failed to find yang:date-and-time type definition