-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to rollback session (#128)
- Loading branch information
Showing
5 changed files
with
104 additions
and
2 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/ArtemisNetCoreClient/Framing/Outgoing/RollbackMessage.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using ActiveMQ.Artemis.Core.Client.InternalUtilities; | ||
|
||
namespace ActiveMQ.Artemis.Core.Client.Framing.Outgoing; | ||
|
||
internal readonly struct RollbackMessage : IOutgoingPacket | ||
{ | ||
public PacketType PacketType => PacketType.SessionRollbackMessage; | ||
|
||
public required bool ConsiderLastMessageAsDelivered { get; init; } | ||
|
||
public int GetRequiredBufferSize() | ||
{ | ||
return sizeof(bool); | ||
} | ||
|
||
public int Encode(Span<byte> buffer) | ||
{ | ||
return ArtemisBinaryConverter.WriteBool(ref buffer.GetReference(), ConsiderLastMessageAsDelivered); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters