예제 #1
0
        CanonicalQueueAddress GetDelayedTableAddress(DelayedDeliverySettings delayedDeliverySettings)
        {
            var delayedQueueLogicalAddress = logicalAddress().CreateQualifiedAddress(delayedDeliverySettings.Suffix);
            var delayedQueueAddress        = addressTranslator.Generate(delayedQueueLogicalAddress);

            return(addressTranslator.GetCanonicalForm(delayedQueueAddress));
        }
예제 #2
0
        /// <summary>
        /// Enables native delayed delivery.
        /// </summary>
        public static DelayedDeliverySettings UseNativeDelayedDelivery(this TransportExtensions <SqlServerTransport> transportExtensions)
        {
            var sendOnlyEndpoint = transportExtensions.GetSettings().GetOrDefault <bool>("Endpoint.SendOnly");

            if (sendOnlyEndpoint)
            {
                throw new Exception("Native delayed delivery is only supported for endpoints capable of receiving messages.");
            }
            var settings = new DelayedDeliverySettings();

            transportExtensions.GetSettings().Set <DelayedDeliverySettings>(settings);
            transportExtensions.GetSettings().EnableFeatureByDefault <PreventRoutingMessagesToTimeoutManager>();
            return(settings);
        }