File tree Expand file tree Collapse file tree
src/NetEvolve.Pulse.AzureQueueStorage/Outbox
tests/NetEvolve.Pulse.Tests.Unit/AzureQueueStorage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,14 +20,12 @@ namespace NetEvolve.Pulse.Outbox;
2020/// </remarks>
2121public sealed class AzureQueueStorageMessageTransport : IMessageTransport , IDisposable
2222{
23- internal const int MaxMessageSizeInBytes = 48 * 1024 ; // 48 KB
23+ internal const int MaxMessageSizeInBytes = 48 * 1024 ; // Raw 48 KB limit (64 KB after Base64 encoding)
2424
2525 private readonly AzureQueueStorageTransportOptions _options ;
2626 private readonly QueueClient ? _queueClientOverride ;
2727 private readonly SemaphoreSlim _initLock = new SemaphoreSlim ( 1 , 1 ) ;
28-
29- // Volatile ensures the double-checked locking pattern is correct across threads.
30- private volatile QueueClient ? _queueClient ;
28+ private QueueClient ? _queueClient ;
3129
3230 /// <summary>
3331 /// Initializes a new instance of the <see cref="AzureQueueStorageMessageTransport"/> class.
@@ -143,7 +141,7 @@ private async Task<QueueClient> GetQueueClientAsync(CancellationToken cancellati
143141 }
144142 else
145143 {
146- var queueUri = new Uri ( $ " { _options . QueueServiceUri ! . AbsoluteUri . TrimEnd ( '/' ) } / { _options . QueueName } " ) ;
144+ var queueUri = new Uri ( _options . QueueServiceUri ! , _options . QueueName ) ;
147145 client = new QueueClient ( queueUri , new DefaultAzureCredential ( ) ) ;
148146 }
149147
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ private sealed class FakeQueueClient : QueueClient
244244 [ System . Diagnostics . CodeAnalysis . SuppressMessage (
245245 "Reliability" ,
246246 "CA2000:Dispose objects before losing scope" ,
247- Justification = "FakeAzureResponse. Dispose is a no-op; suppressed for test code ."
247+ Justification = "FakeAzureResponse is passed to Response.FromValue and immediately returned; its Dispose is a no-op."
248248 ) ]
249249 public override Task < Response < SendReceipt > > SendMessageAsync (
250250 string messageText ,
@@ -268,7 +268,7 @@ public override Task<Response<SendReceipt>> SendMessageAsync(
268268 [ System . Diagnostics . CodeAnalysis . SuppressMessage (
269269 "Reliability" ,
270270 "CA2000:Dispose objects before losing scope" ,
271- Justification = "FakeAzureResponse.Dispose is a no-op; suppressed for test code ."
271+ Justification = "FakeAzureResponse is immediately returned as the raw response; its Dispose is a no-op ."
272272 ) ]
273273 public override Task < Response > CreateIfNotExistsAsync (
274274 IDictionary < string , string > ? metadata = null ,
You can’t perform that action at this time.
0 commit comments