We are using RFA.NET 8 develops Provider application and we use requestToken.GetHashCode() to log the requestTokens that the provider received from ADH. However sometime we see duplicated value from GetHashCode method while the first request received the same value still active. Currently we do not recieve any error in the provider but we would like to confirm that
-Is it possible for different Client session to create the same RequestToken ? and Is the RequestToken value unique across servers ?
The Request Tokens are unique across client sessions. Actually GetHashCode method does not returns actual value of requestToken. RFA.NET keep the actual value in some internal variable. Howvever the duplicate value appears to be a collision in the getHashCode method.
RFA.NET RequestToken.GetHashCode() calls ((long)_RequestToken).ToString().GetHashCode(); which is .NET function to generate Hash Code. Based on the Note from MSDN, method ToString().GetHashCode() can generate collision value from difference string. It could be an issue mentioned in the document.
You should not use GetHashCode to differenciate RequestToken. If you found any issue after receive duplicate HashCode, please turn on RSSL logs and open ticket to API support to investigate issue further.