Example #1
0
 public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack)
 {
     endpointQueueMappings.AddOrUpdate(
         queueToTrack.EndpointName,
         id => queueToTrack.InputQueue,
         (id, old) => queueToTrack.InputQueue
         );
 }
        public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack)
        {
            endpointQueues.AddOrUpdate(queueToTrack.EndpointName, _ => queueToTrack.InputQueue, (_, currentValue) =>
            {
                if (currentValue != queueToTrack.InputQueue)
                {
                    sizes.TryRemove(currentValue, out var _);
                }

                return(queueToTrack.InputQueue);
            });
        }
Example #3
0
 public bool Equals(EndpointToQueueMapping other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(string.Equals(EndpointName, other.EndpointName) && string.Equals(InputQueue, other.InputQueue));
 }
Example #4
0
        public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack)
        {
            var queueName = BackwardsCompatibleQueueNameSanitizer.Sanitize(queueToTrack.InputQueue);

            var queueClient = CloudStorageAccount.Parse(connectionString).CreateCloudQueueClient();

            var emptyQueueLength = new QueueLengthValue
            {
                QueueName      = queueName,
                Length         = 0,
                QueueReference = queueClient.GetQueueReference(queueName)
            };

            queueLengths.AddOrUpdate(queueToTrack, _ => emptyQueueLength, (_, existingQueueLength) => existingQueueLength);
        }
Example #5
0
        public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack)
        {
            var sqlTable = SqlTable.Parse(queueToTrack.InputQueue, defaultSchema);

            tableNames.AddOrUpdate(queueToTrack, _ => sqlTable, (_, currentSqlTable) =>
            {
                if (currentSqlTable.Equals(sqlTable) == false)
                {
                    tableSizes.TryRemove(currentSqlTable, out var _);
                }

                return(sqlTable);
            });

            tableSizes.TryAdd(sqlTable, 0);
        }
Example #6
0
        public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack)
        {
            var queue = QueueNameHelper.GetSqsQueueName(queueToTrack.InputQueue, queueNamePrefix);

            queues.AddOrUpdate(queueToTrack, _ => queue, (_, currentQueue) =>
            {
                if (currentQueue != queue)
                {
                    sizes.TryRemove(currentQueue, out var _);
                }

                return(queue);
            });

            sizes.TryAdd(queue, 0);
        }
Example #7
0
 EndpointInputQueue ToEndpointInputQueue(EndpointToQueueMapping dto)
 {
     return(new EndpointInputQueue(dto.EndpointName, dto.InputQueue));
 }
 public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack)
 {
 }
Example #9
0
 static EndpointInputQueue ToQueueId(EndpointToQueueMapping endpointInputQueueDto)
 {
     return(new EndpointInputQueue(endpointInputQueueDto.EndpointName, endpointInputQueueDto.InputQueue));
 }
Example #10
0
 public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack)
 {
     //This is a no op for MSMQ since the endpoints report their queue lenght to SC using custom messages
 }
Example #11
0
 public void TrackEndpointInputQueue(EndpointToQueueMapping queueToTrack)
 {
     endpointsHash.AddOrUpdate(queueToTrack, queueToTrack, (_, __) => queueToTrack);
 }