private static string DeriveMessageQueuePath(NimbusMessage message) { object subscriptionName; if (message.Properties.TryGetValue(MessagePropertyKeys.RedeliveryToSubscriptionName, out subscriptionName)) { return(InProcessTransport.FullyQualifiedSubscriptionPath(message.DeliverTo, (string)subscriptionName)); } return(message.DeliverTo); }
private async Task AddToMulticastSubscriberQueues(NimbusMessage message) { await _topic.SubscriptionNames .Select(subscriptionName => { var messageClone = Clone(message); var fullyQualifiedSubscriptionPath = InProcessTransport.FullyQualifiedSubscriptionPath(_topic.TopicPath, subscriptionName); //message.To = fullyQualifiedSubscriptionPath; //FIXME find an elegant solution for this var subscriptionQueue = _messageStore.GetOrCreateMessageQueue(fullyQualifiedSubscriptionPath); var task = subscriptionQueue.Add(messageClone); return(task); }) .WhenAll(); }
public InProcessSubscriptionReceiver(Subscription subscription, ConcurrentHandlerLimitSetting concurrentHandlerLimit, InProcessMessageStore messageStore, IGlobalHandlerThrottle globalHandlerThrottle, ILogger logger) : base( InProcessTransport.FullyQualifiedSubscriptionPath(subscription.TopicPath, subscription.SubscriptionName), concurrentHandlerLimit, messageStore, globalHandlerThrottle, logger) { _subscription = subscription; _messageStore = messageStore; }