-
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.
- Loading branch information
Showing
10 changed files
with
148 additions
and
2 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MQ/@EntryIndexedValue">MQ</s:String> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Anycast/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
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,17 @@ | ||
using ActiveMQ.Artemis.Core.Client.Framing; | ||
|
||
namespace ActiveMQ.Artemis.Core.Client; | ||
|
||
internal class Consumer(Session session) : IConsumer | ||
{ | ||
public required long ConsumerId { get; init; } | ||
|
||
public async ValueTask DisposeAsync() | ||
{ | ||
var request = new SessionConsumerCloseMessage | ||
{ | ||
ConsumerId = ConsumerId | ||
}; | ||
_ = await session.SendBlockingAsync<SessionConsumerCloseMessage, NullResponse>(request, default); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/ArtemisNetCoreClient/Framing/ActiveMQExceptionMessage.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,19 @@ | ||
namespace ActiveMQ.Artemis.Core.Client.Framing; | ||
|
||
internal class ActiveMQExceptionMessage : Packet | ||
{ | ||
public const byte Type = 20; | ||
|
||
public int Code { get; private set; } | ||
public string? Message { get; set; } | ||
|
||
public override void Encode(ByteBuffer buffer) | ||
{ | ||
} | ||
|
||
public override void Decode(ByteBuffer buffer) | ||
{ | ||
Code = buffer.ReadInt(); | ||
Message = buffer.ReadNullableString(); | ||
} | ||
} |
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
17 changes: 17 additions & 0 deletions
17
src/ArtemisNetCoreClient/Framing/SessionConsumerCloseMessage.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,17 @@ | ||
namespace ActiveMQ.Artemis.Core.Client.Framing; | ||
|
||
internal class SessionConsumerCloseMessage : Packet | ||
{ | ||
public const byte Type = 74; | ||
|
||
public long ConsumerId { get; set; } | ||
|
||
public override void Encode(ByteBuffer buffer) | ||
{ | ||
buffer.WriteLong(ConsumerId); | ||
} | ||
|
||
public override void Decode(ByteBuffer buffer) | ||
{ | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/ArtemisNetCoreClient/Framing/SessionCreateConsumerMessage.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,28 @@ | ||
namespace ActiveMQ.Artemis.Core.Client.Framing; | ||
|
||
internal class SessionCreateConsumerMessage : Packet | ||
{ | ||
public const byte Type = 40; | ||
|
||
public required long Id { get; init; } | ||
public required string QueueName { get; init; } | ||
public string? FilterString { get; init; } | ||
public required int Priority { get; init; } | ||
public required bool BrowseOnly { get; init; } | ||
public required bool RequiresResponse { get; init; } | ||
|
||
|
||
public override void Encode(ByteBuffer buffer) | ||
{ | ||
buffer.WriteLong(Id); | ||
buffer.WriteByteString(QueueName); | ||
buffer.WriteNullableByteString(FilterString); | ||
buffer.WriteBool(BrowseOnly); | ||
buffer.WriteBool(RequiresResponse); | ||
buffer.WriteInt(Priority); | ||
} | ||
|
||
public override void Decode(ByteBuffer buffer) | ||
{ | ||
} | ||
} |
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,5 @@ | ||
namespace ActiveMQ.Artemis.Core.Client; | ||
|
||
public interface IConsumer : IAsyncDisposable | ||
{ | ||
} |
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