TROMessage and heavy threading

Delphi Tokyo, 9.4.109.1377

Hi guys,

So now that I know that TROMessage is not thread safe I’m creating a clone of TROMessage for all proxy clients being created dynamically and altering its ClientID to match a unique one to identify each Service Program.

My question goes, each service has a TROOLympiaEventRepository and a TROLocalServer. Those two require a message and because each service uses itself and call others I cant risk not achieving thread safety.

Do I need to clone those messages too, for each of those components and also for the normal TROSuperTCPServer?

I’ll assume that for TROSuperTCPServer it is not required, but now knowing that TROLocalServer doesnt spawn threads when called, its behaviour is different and cant risk not to be sure.

Should I just assume to clone everything? Also TROEventReceiver which receives a message, I guess that one has to be cloned too? (I think it includes a property for cloning, so maybe that one is safe but because I need to assign the client id to match the same id for everything on the Service Program i think is safer to do it manually).

Thanks, logged as bugs://82353

Hi,

We will clone message automatically where it is needed so this issue should be solved

1 Like

Hello Evgeny,

Thank you. I’ll assume that I’ll be able to access the clone’s ClientIds property the usual way? Just because I need to make sure that everything coming out of that specific service/program is identified in Olympia and in all other services as a unique program/session.

yes, no breaking changes should be here

bugs://82353 got closed with status fixed.