diff --git a/src/Raven.Server/Documents/ETL/Providers/Queue/AzureQueueStorage/AzureQueueStorageDocumentTransformer.cs b/src/Raven.Server/Documents/ETL/Providers/Queue/AzureQueueStorage/AzureQueueStorageDocumentTransformer.cs index 2ab6b2380fbb..cce3c989f49f 100644 --- a/src/Raven.Server/Documents/ETL/Providers/Queue/AzureQueueStorage/AzureQueueStorageDocumentTransformer.cs +++ b/src/Raven.Server/Documents/ETL/Providers/Queue/AzureQueueStorage/AzureQueueStorageDocumentTransformer.cs @@ -30,9 +30,9 @@ private void LoadToFunction(string queueName, ScriptRunnerResult document, Cloud var result = document.TranslateToObject(Context); - var topic = GetOrAdd(queueName); + var queue = GetOrAdd(queueName); - topic.Items.Add(new AzureQueueStorageItem(Current) { TransformationResult = result, Attributes = attributes }); + queue.Items.Add(new AzureQueueStorageItem(Current) { TransformationResult = result, Attributes = attributes }); } public override void Initialize(bool debugMode) diff --git a/src/Raven.Server/Documents/ETL/Providers/Queue/AzureQueueStorage/AzureQueueStorageEtl.cs b/src/Raven.Server/Documents/ETL/Providers/Queue/AzureQueueStorage/AzureQueueStorageEtl.cs index 3ee3daba3bf9..f241c4bd7c69 100644 --- a/src/Raven.Server/Documents/ETL/Providers/Queue/AzureQueueStorage/AzureQueueStorageEtl.cs +++ b/src/Raven.Server/Documents/ETL/Providers/Queue/AzureQueueStorage/AzureQueueStorageEtl.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Text.Json; using System.Text.Json.Serialization; using Azure.Storage.Queues; @@ -102,6 +103,7 @@ private string CreateBase64CloudEvent(AzureQueueStorageItem queueItem) protected override void OnProcessStopped() { _queueClients.Clear(); + _alreadyCreatedQueues.Clear(); } private void CreateQueueIfNotExists(QueueClient queueClient)