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, “”, 32390);
try {
} catch (JNCException e) {
} catch (IOException e) {

    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:
I do not know much about JNC, other than that the source code is available here: