C# Класс NServiceBus.Transports.RabbitMQ.Routing.ConventionalRoutingTopology

Implements the RabbitMQ routing topology as described at http://codebetter.com/drusellers/2011/05/08/brain-dump-conventional-routing-in-rabbitmq/ take 4: we generate an exchange for each queue so that we can do direct sends to the queue. it is bound as a fanout exchange for each message published we generate series of exchanges that go from concrete class to each of its subclass / interfaces these are linked together from most specific to least specific. This way if you subscribe to the base interface you get all the messages. or you can be more selective. all exchanges in this situation are bound as fanouts. the subscriber declares his own queue and his queue exchange – he then also declares/binds his exchange to each of the message type exchanges desired the publisher discovers all of the exchanges needed for a given message, binds them all up and then pushes the message into the most specific queue letting RabbitMQ do the fanout for him. (One publish, multiple receivers!) we generate an exchange for each queue so that we can do direct sends to the queue. it is bound as a fanout exchange
Наследование: IRoutingTopology
Показать файл Открыть проект

Открытые методы

Метод Описание
ConventionalRoutingTopology ( bool useDurableExchanges ) : System
Initialize ( IModel channel, string mainQueue ) : void
Publish ( IModel channel, Type type, TransportMessage message, IBasicProperties properties ) : void
Send ( IModel channel, Address address, TransportMessage message, IBasicProperties properties ) : void
SetupSubscription ( IModel channel, Type type, string subscriberName ) : void
TeardownSubscription ( IModel channel, Type type, string subscriberName ) : void

Приватные методы

Метод Описание
CreateExchange ( IModel channel, string exchangeName ) : void
ExchangeName ( Type type ) : string
IsTypeTopologyKnownConfigured ( Type eventType ) : bool
MarkTypeConfigured ( Type eventType ) : void
SetupTypeSubscriptions ( IModel channel, Type type ) : void

Описание методов

ConventionalRoutingTopology() публичный Метод

public ConventionalRoutingTopology ( bool useDurableExchanges ) : System
useDurableExchanges bool
Результат System

Initialize() публичный Метод

public Initialize ( IModel channel, string mainQueue ) : void
channel IModel
mainQueue string
Результат void

Publish() публичный Метод

public Publish ( IModel channel, Type type, TransportMessage message, IBasicProperties properties ) : void
channel IModel
type System.Type
message TransportMessage
properties IBasicProperties
Результат void

Send() публичный Метод

public Send ( IModel channel, Address address, TransportMessage message, IBasicProperties properties ) : void
channel IModel
address Address
message TransportMessage
properties IBasicProperties
Результат void

SetupSubscription() публичный Метод

public SetupSubscription ( IModel channel, Type type, string subscriberName ) : void
channel IModel
type System.Type
subscriberName string
Результат void

TeardownSubscription() публичный Метод

public TeardownSubscription ( IModel channel, Type type, string subscriberName ) : void
channel IModel
type System.Type
subscriberName string
Результат void