0

As per RFC 6733 (https://www.rfc-editor.org/rfc/rfc6733#section-8.8) session-id should be in below format:

  <DiameterIdentity>;<high 32 bits>;<low 32 bits>[;<optional value>]

DiameterIdentity can be FQDN/Realm but we need to set some high and low 32 bits value

Can someone please suggest how we can implement it in Java.In Optional value I am thinking to put event timestamp

Community
  • 1
  • 1
Sandeep
  • 61
  • 1
  • 1

2 Answers2

0

Since session-id should be unique the best thing is to use current time (for example in ms) and use the result for high/low value.

For example You can also do the high value permanent and use the time for the low value.

Oded Itzhaky
  • 445
  • 5
  • 16
0

import java.util.UUID; import com.datastax.oss.driver.api.core.uuid.Uuids;

UUID subscriptionId = Uuids.timeBased();

Sandeep
  • 61
  • 1
  • 1