public RabbitMqTopologyConfiguration(IRabbitMqTopologyConfiguration topologyConfiguration) { _messageTopology = topologyConfiguration.Message; _sendTopology = topologyConfiguration.Send; _publishTopology = topologyConfiguration.Publish; _consumeTopology = new RabbitMqConsumeTopology(topologyConfiguration.Message, topologyConfiguration.Publish); }
public RabbitMqTopologyConfiguration(IMessageTopologyConfigurator messageTopology) { _messageTopology = messageTopology; _sendTopology = new RabbitMqSendTopology(RabbitMqEntityNameValidator.Validator); _sendTopology.Connect(new DelegateSendTopologyConfigurationObserver(GlobalTopology.Send)); _sendTopology.AddConvention(new RoutingKeySendTopologyConvention()); _publishTopology = new RabbitMqPublishTopology(messageTopology); _publishTopology.Connect(new DelegatePublishTopologyConfigurationObserver(GlobalTopology.Publish)); var observer = new PublishToSendTopologyConfigurationObserver(_sendTopology); _publishTopology.Connect(observer); _consumeTopology = new RabbitMqConsumeTopology(messageTopology, _publishTopology); }