Skip to content

Commit

Permalink
Sending a fake session identifier in Ping() for Azure Service Bus. Cl…
Browse files Browse the repository at this point in the history
…oses GH-1230
  • Loading branch information
jeremydmiller committed Jan 21, 2025
1 parent 578bed1 commit b77b94e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public InlineAzureServiceBusSender(AzureServiceBusEndpoint endpoint, IOutgoingMa
public async Task<bool> 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);
Expand Down
7 changes: 6 additions & 1 deletion src/Wolverine/Envelope.Internals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
};
}

Expand Down

0 comments on commit b77b94e

Please sign in to comment.