diff --git a/src/Transports/Azure/Wolverine.AzureServiceBus/Internal/InlineAzureServiceBusSender.cs b/src/Transports/Azure/Wolverine.AzureServiceBus/Internal/InlineAzureServiceBusSender.cs index e25a94410..40fb5c6ea 100644 --- a/src/Transports/Azure/Wolverine.AzureServiceBus/Internal/InlineAzureServiceBusSender.cs +++ b/src/Transports/Azure/Wolverine.AzureServiceBus/Internal/InlineAzureServiceBusSender.cs @@ -27,6 +27,11 @@ public InlineAzureServiceBusSender(AzureServiceBusEndpoint endpoint, IOutgoingMa public async Task PingAsync() { var envelope = Envelope.ForPing(Destination); + + // For GH-1230, and according to Azure Service Bus docs, it does not harm + // to send a session identifier to a non-FIFO queue, so just do this by default + envelope.GroupId = Guid.NewGuid().ToString(); + try { await SendAsync(envelope); diff --git a/src/Wolverine/Envelope.Internals.cs b/src/Wolverine/Envelope.Internals.cs index 789cc013b..0886e33e2 100644 --- a/src/Wolverine/Envelope.Internals.cs +++ b/src/Wolverine/Envelope.Internals.cs @@ -267,7 +267,12 @@ public static Envelope ForPing(Uri destination) MessageType = PingMessageType, Data = [1, 2, 3, 4], ContentType = "wolverine/ping", - Destination = destination + Destination = destination, + + // According to both AWS SQS & Azure Service Bus docs, it does no + // harm to send a session identifier to a non-FIFO queue, and it's + // most certainly needed for FIFO queues + GroupId = Guid.NewGuid().ToString() }; }