Hi guys,
Using Delphi Tokyo and version 9.4.109.1377. Same version on .net clients.
Server side is built with Delphi using Olympia and SuperTCP indy, with clients on .net and delphi.
There is a central service that all services/clients use to login into the infrastructure. Built on Delphi and another service use to send notifications, built on Delphi, both of them use Olympia so they can share sessions.
This problem is not happening with the Delphi clients, only .Net ones. It goes like these:
When service/program starts two proxies for services (a login one and notifications) are created and each of them has a message object/interface on them. If I review the proxies both of them have different message client ids. Thats fine.
After logging in, I pass down the Session Id directly from the session object from the delphi server, in good theory it should match the clientid of the message object from the login service, but in any case I overwrite it with the one coming back from the server. I change the ClientId on both message objects for both proxies.
When I use a Delphi Notification service proxy a notification goes out, notification service receives it, it is plugged to Olympia, he sees the GUID, it exists, does its thing.
When I use a .Net version of the same proxy, I can see how the message object has the client id obtained from the session but for some reason it reaches to the Delphi server with a different id. Most probably the original or a regenerated one.
Funny enough, if I disconnect the client and let it reconnect, I can see on the server how the guid being reported as being reconnecting is not the session id I overwrite but the same as the one that the server complaints is not found originally.
Ive spent several days looking for the moment these Ids are changing with no avail. Everywhere it seems to be respecting the change but once goes into the .net internals of RO, the original value might not be changed, or a new GUID is generated and things stop working.
We create the Delphi and .Net clients getting the best match message and transport for a given URI using the provided methods and we keep both channel and message as singleton per service on the client program so they can be reused on service proxies or even remote services. We do not pass a uri and let it generate everytime because we want to reuse the connection for events, identify specifically the clients, etc.
Proxies are created transient and they receive as parameters the message and channel singletons. So the only singleton aspect of it is the message and channel.
Could it be that on the proxy creation the id is stored somewhere and doesnt get change? The Delphi side of things works fine, i’ve spent days figuring out why the ID keeps changing on the .net side.
Any assistance will be a blessing.
Thank you.