Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Publish to specific stateless instance #84

Open
olivergrimes opened this issue Nov 21, 2019 · 3 comments
Open

Publish to specific stateless instance #84

olivergrimes opened this issue Nov 21, 2019 · 3 comments
Labels

Comments

@olivergrimes
Copy link

I had a look through the code and couldn't see how messages are published to specific stateless service instances. Is that possible with this library?

@danadesrosiers
Copy link
Collaborator

I don't think that's possible with remoting. IServiceProxyFactory.CreateServiceProxy allows us to set the TargetReplicaSelector, but the only option for stateless services is RandomInstance. And that makes sense. I don't think you're ever supposed to interact with a specific instance when working with a stateless service. Perhaps you are looking for a partitioned stateful service?

@olivergrimes
Copy link
Author

olivergrimes commented Nov 21, 2019

@danadesrosiers Thanks for the response. I asked as I'm currently using Actor Events to support messaging between back-end services and specific instances of a stateless service hosting SignalR.

https://github.com/olivergrimes/servicefabric-topicactor-signalr

I'm doing this to avoid the overhead of a standard backplane. The service-fabric-pub-sub documentation states that it supports stateless services, therefore I assumed there may have been another way to achieve what I ended up using Actor Events for.

@danadesrosiers
Copy link
Collaborator

The library is designed to pass messages between different services, not different instances of the same service. One queue is created per partition, which will be just one for a stateless service. The message is published to a single instance at random. Sounds like it's not what you need, unfortunately.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants