When you have multiple physical instances of a logical endpoint, both instances share the same message queue and load balance the commands and events.
Is it possible when sending a command to specify an instance to receive the message?
Let’s say most of the time it’s okay the share the load, but sometimes I want a specific server to handle it.
I tried to set
and send a message with
var sendOptions = new SendOptions(); sendOptions.SetDestination("TaskManager"); if (!string.IsNullOrEmpty(taskManagerInstance)) sendOptions.RouteToSpecificInstance(taskManagerInstance);
But it fail saying the destination is already specified. If I don’t call SetDestination(), it fails saying the destination is not specified…
Is this function used for what I want to do?
I’m aware if you give it a different endpoint name to both instances, they both have their unique queues and receive all events and now I can set the specific name as the destination, but this way it doesn’t work for sharing the work load.