Hi,
I wish to support the following scenario.
Multiple Hosts with a single endpoint instance all using the competing consumer pattern to process messages from QueueA.
Additionally each Host should be able to subscribe to an event. In this scenario we wish to update an in memory cache via the event message. When the Event fires ALL Hosts should receive a copy of the event message.
I have tried using the MakeInstanceUniquelyAddressable property on EndpointConfiguration, this results in an additional queue being created.
However when the endpoint subscribes to the event it uses the LocalAddress
[From MessageDrivenSubscriptions.cs ]
if (canReceive)
{
var subscriberAddress = context.Receiving.LocalAddress;
var subscriptionRouter = new SubscriptionRouter(publishers, endpointInstances, i => transportInfrastructure.ToTransportAddress(LogicalAddress.CreateRemoteAddress(i)));
context.Pipeline.Register(b => new MessageDrivenSubscribeTerminator(subscriptionRouter, subscriberAddress, context.Settings.EndpointName(), b.Build<IDispatchMessages>()), "Sends subscription requests when message driven subscriptions is in use");
context.Pipeline.Register(b => new MessageDrivenUnsubscribeTerminator(subscriptionRouter, subscriberAddress, context.Settings.EndpointName(), b.Build<IDispatchMessages>()), "Sends requests to unsubscribe when message driven subscriptions is in use");
If it was possible to use context.Receiving.InstanceSpecificQueue then I believe this would all work as I wanted. However currently the event message is only processed by one of my instances.
Is there a way to override this feature (I’d rather not try that) or is there another suggested approach?