Skip to content

Commit

Permalink
Add missing consumer docs (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
Havret authored May 27, 2024
1 parent cbdc7f6 commit a827ce2
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/ArtemisNetCoreClient/IConsumer.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
namespace ActiveMQ.Artemis.Core.Client;

/// <summary>
/// A consumer receives messages from ActiveMQ Artemis queues.
/// </summary>
public interface IConsumer : IAsyncDisposable
{
/// <summary>
/// Receives a message from the broker. This operation will asynchronously wait for a message to be available.
/// </summary>
/// <param name="cancellationToken">Cancellation token</param>
ValueTask<ReceivedMessage> ReceiveMessageAsync(CancellationToken cancellationToken = default);

/// <summary>
/// Acknowledges all messages received by the consumer so far.
/// Acknowledges all messages received by the consumer so far and asynchronously awaits for the confirmation from the broker.
/// </summary>
ValueTask AcknowledgeAsync(MessageDelivery messageDelivery, CancellationToken cancellationToken);

/// <param name="messageDelivery">Delivery information of a last message to acknowledge.</param>
/// <param name="cancellationToken">Cancellation token.</param>
ValueTask AcknowledgeAsync(MessageDelivery messageDelivery, CancellationToken cancellationToken = default);

/// <summary>
/// Acknowledges the message.
/// Acknowledges the message and asynchronously awaits for the confirmation from the broker.
/// </summary>
/// <param name="messageDelivery">Delivery information of a message to acknowledge.</param>
/// <param name="cancellationToken">Cancellation token.</param>
ValueTask IndividualAcknowledgeAsync(in MessageDelivery messageDelivery, CancellationToken cancellationToken);
ValueTask IndividualAcknowledgeAsync(in MessageDelivery messageDelivery, CancellationToken cancellationToken = default);

/// <summary>
/// Acknowledges all messages received by the consumer. It doesn't wait for the confirmation from the broker.
Expand Down

0 comments on commit a827ce2

Please sign in to comment.