I have stateful service that process data in the reliable queue (inside a while loop). The processing of data actually calls a stateless service.
Since a stateless service can move from one node to another, is it safe that I inject this dependency (stateless service) in the constructor of the stateful service? Just want to make sure that the dependency initialized/injected in the constructor is not fix to one node.
If you're using remoting to communicate with the stateless service, you can inject the IServiceProxyFactory in the constructor. This way you can also inject a Mock for test-purposes.
The question changed after this answer. Additional info: Service remoting handles resolution of service addresses, connection, retry, and error handling
example: