I have a single application, started as a host + 3 slaves. All 4 instances is configured with the same endpoint. The host is posting commands that the slaves will execute.
var endpointConfiguration = new EndpointConfiguration("myqueue"); var transport = endpointConfiguration.UseTransport<RabbitMQTransport>(); transport.ConnectionString("host=localhost;username=guest;password=guest"); transport.UseDirectRoutingTopology(); if (host) endpointConfiguration.SendOnly();
If I send the commands with SendLocal from the host, an Exception is thrown
System.InvalidOperationException: Cannot route to instances of this endpoint since it's configured to be in send-only mode.
I can see why this would be a helpful Exception, but in my case with the Scale-out on the same endpoint, I would like this to be valid. I know I could use Send with the name of the queue, which I want to avoid.
If this is not possible, I think the API is wrong when using RabbitMQ as transport. It should not be possible to set a endpoint name when using SendOnly. This is mandatory in the EndpointConfiguration constructor.