public ServiceBusTopologyConfiguration(IServiceBusTopologyConfiguration topologyConfiguration) { _messageTopology = topologyConfiguration.Message; _sendTopology = topologyConfiguration.Send; _publishTopology = topologyConfiguration.Publish; _consumeTopology = new ServiceBusConsumeTopology(topologyConfiguration.Message, topologyConfiguration.Publish); }
public ServiceBusTopologyConfiguration(IMessageTopologyConfigurator messageTopology) { _messageTopology = messageTopology; _sendTopology = new ServiceBusSendTopology(); _sendTopology.Connect(new DelegateSendTopologyConfigurationObserver(GlobalTopology.Send)); _sendTopology.AddConvention(new SessionIdSendTopologyConvention()); _sendTopology.AddConvention(new PartitionKeySendTopologyConvention()); _publishTopology = new ServiceBusPublishTopology(messageTopology); _publishTopology.Connect(new DelegatePublishTopologyConfigurationObserver(GlobalTopology.Publish)); var observer = new PublishToSendTopologyConfigurationObserver(_sendTopology); _publishTopology.Connect(observer); _consumeTopology = new ServiceBusConsumeTopology(messageTopology, _publishTopology); }