IBrokeredMessageReceiver CreateBrokeredMessageReceiver(string topicPath, string subscriptionName, Action <IReceiveEndpointConfigurator> configure) { if (string.IsNullOrWhiteSpace(topicPath)) { throw new ArgumentNullException(nameof(topicPath)); } if (configure == null) { throw new ArgumentNullException(nameof(configure)); } var subscriptionPath = EntityNameHelper.FormatSubscriptionPath(topicPath, subscriptionName); return(_receivers.GetOrAdd(subscriptionPath, name => { var topicConfigurator = new TopicConfigurator(topicPath, false); var settings = new SubscriptionEndpointSettings(topicConfigurator.GetTopicDescription(), subscriptionName); var endpointConfiguration = _hostConfiguration.CreateSubscriptionEndpointConfiguration(settings); var configurator = new SubscriptionBrokeredMessageReceiverConfiguration(_hostConfiguration, endpointConfiguration); configure(configurator); return configurator.Build(); })); }
public ServiceBusMessagePublishTopology(IMessageTopology <TMessage> messageTopology) { _messageTopology = messageTopology; _topicDescription = new Lazy <TopicDescription>(GetTopicDescription); _topicConfigurator = new TopicConfigurator(messageTopology.EntityName, TypeMetadataCache <TMessage> .IsTemporaryMessageType); }
public AmazonSqsMessagePublishTopology(IMessageTopology <TMessage> messageTopology) { _messageTopology = messageTopology; var topicName = _messageTopology.EntityName; var temporary = TypeMetadataCache <TMessage> .IsTemporaryMessageType; var durable = !temporary; var autoDelete = temporary; _topic = new TopicConfigurator(topicName, durable, autoDelete); }
public ActiveMqMessagePublishTopology(IActiveMqPublishTopology publishTopology, IMessageTopology <TMessage> messageTopology) { _messageTopology = messageTopology; var topicName = $"{publishTopology.VirtualTopicPrefix}{messageTopology.EntityName}"; var temporary = TypeMetadataCache <TMessage> .IsTemporaryMessageType; var durable = !temporary; var autoDelete = temporary; _topic = new TopicConfigurator(topicName, durable, autoDelete); _implementedMessageTypes = new List <IActiveMqMessagePublishTopology>(); }
IBrokeredMessageReceiver CreateBrokeredMessageReceiver(string topicPath, string subscriptionName, Action <IReceiveEndpointConfigurator> configure) { if (string.IsNullOrWhiteSpace(topicPath)) { throw new ArgumentNullException(nameof(topicPath)); } if (configure == null) { throw new ArgumentNullException(nameof(configure)); } var subscriptionPath = EntityNameHelper.FormatSubscriptionPath(topicPath, subscriptionName); return(_receivers.GetOrAdd(subscriptionPath, name => { var topicConfigurator = new TopicConfigurator(topicPath, false);