What is a Competing Consumer?
How to configure a service to be a competing consumer.
At this point in MassTransit a competing consumer is about two IServiceBus instances in one 'win service'
One of these busses is the 'control' bus which actively manages and manipulates the ISubscriptionCache
The other bus is the 'data' bus which uses the ISubscriptionCache
Set up the configuration
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<components>
<component id="subscriptioncache.shared"
service="MassTransit.ServiceBus.Subscriptions.ISubscriptionCache, MassTransit.ServiceBus"
type="MassTransit.ServiceBus.Subscriptions.LocalSubscriptionCache, MassTransit.ServiceBus"/>
</components>
<facilities>
<facility id="masstransit">
<bus id="server"
endpoint="msmq://localhost/mt_server">
<subscriptionCache name="subscriptioncache.shared"/>
<managementService heartbeatInterval="3" />
</bus>
<bus id="control"
endpoint="msmq://localhost/mt_server1">
<subscriptionCache name="subscriptioncache.shared"/>
<subscriptionService endpoint="msmq://localhost/mt_pubsub">
<localEndpoint>msmq://localhost/mt_server</localEndpoint>
</subscriptionService>
</bus>
<transports>
<transport>MassTransit.ServiceBus.MSMQ.MsmqEndpoint, MassTransit.ServiceBus.MSMQ</transport>
</transports>
</facility>
</facilities>
</configuration>
Comments (0)
You don't have permission to comment on this page.