- 
                Notifications
    You must be signed in to change notification settings 
- Fork 108
Description
Is your feature request related to a problem? Please describe.
In our app server we have a custom router class that inherits EndpointRouterDecorator. In implementation of GetEndpointsForUser method, we need to fetch the end point for given user from Redis cache, which is an asynchronous call. However GetEndpointsForUser is not an async method, and we can't make a blocking call within GetEndpointsForUser which will block calling thread and degrades app server performance. As a result, we have to return all endpoints we have which is not very efficient because that means we have to broadcast the message of that user to all endpoints.
Describe the solution you'd like
Make IMessageRouter.GetEndpointsForUser returns async results:
Task<IEnumerable<ServiceEndpoint>> GetEndpointsForUser(string userId, IEnumerable<ServiceEndpoint> endpoints);
Additional context
Add any other context or screenshots about the feature request here.