Session id is being repeated in netconf request

i am updating config via netconf multiple times and i can see the same session id is being repeated after few minutes for a different request… is there any way to have this sessionid unique?

The session ID can be repeated if ConfD restarts. You can use maapi_set_next_user_session_id() to prevent that.

@cohult how can ii generate the custom sessionid for the below code? i need sessionid because sessionname doesnot come in the callback

DeviceUser user = new DeviceUser(“admin”, “admin”, “admin”);
Device device = new Device(“cmaas”, user, “10.69.90.141”, 32390);
device.setDefaultReadTimeout(30);
try {
device.
device.connect(“admin”);
device.newSession(“test-sess”);
} catch (JNCException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}

    NetconfSession nc = device.getSession("test-sess");
    System.out.println("Executing RPC on sessionId" + nc.sessionId);

@ankitrathore, The NETCONF server set the session ID, not the client. See:
https://www.rfc-editor.org/rfc/rfc6241#section-8.1
I do not know much about JNC, other than that the source code is available here: