public InMemoryTopologyConfiguration(IMessageTopologyConfigurator messageTopology) { _messageTopology = messageTopology; _sendTopology = new SendTopology(); _sendTopology.ConnectSendTopologyConfigurationObserver(new DelegateSendTopologyConfigurationObserver(GlobalTopology.Send)); _publishTopology = new InMemoryPublishTopology(messageTopology); _publishTopology.ConnectPublishTopologyConfigurationObserver(new DelegatePublishTopologyConfigurationObserver(GlobalTopology.Publish)); var observer = new PublishToSendTopologyConfigurationObserver(_sendTopology); _publishTopology.ConnectPublishTopologyConfigurationObserver(observer); _consumeTopology = new InMemoryConsumeTopology(messageTopology); }
public GrpcTopologyConfiguration(IMessageTopologyConfigurator messageTopology) { _messageTopology = messageTopology; _sendTopology = new SendTopology(); _sendTopology.ConnectSendTopologyConfigurationObserver(new DelegateSendTopologyConfigurationObserver(GlobalTopology.Send)); _sendTopology.TryAddConvention(new RoutingKeySendTopologyConvention()); _publishTopology = new GrpcPublishTopology(messageTopology); _publishTopology.ConnectPublishTopologyConfigurationObserver(new DelegatePublishTopologyConfigurationObserver(GlobalTopology.Publish)); var observer = new PublishToSendTopologyConfigurationObserver(_sendTopology); _publishTopology.ConnectPublishTopologyConfigurationObserver(observer); _consumeTopology = new GrpcConsumeTopology(messageTopology, _publishTopology); }