Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Transports/RabbitMQ/Wolverine.RabbitMQ/IRabbitMqQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public interface IRabbitMqQueue
/// </summary>
IDictionary<string, object> Arguments { get; }

/// <summary>
/// Arguments for Rabbit MQ channel consume operations
/// </summary>
IDictionary<string, object?> ConsumerArguments { get; }

/// <summary>
/// Declare that Wolverine should purge the existing queue
/// of all existing messages on startup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public async Task CreateAsync()

await Channel!.BasicQosAsync(0, Queue.PreFetchCount, false, _cancellation);
await Channel.BasicConsumeAsync(Queue.QueueName, false,
_transport.ConnectionFactory?.ClientProvidedName ?? _runtime.Options.ServiceName, _consumer,
_transport.ConnectionFactory?.ClientProvidedName ?? _runtime.Options.ServiceName, Queue.ConsumerArguments, _consumer,
_runtime.Cancellation);

if (_transport.AutoPingListeners)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ await _parent.WithAdminChannelAsync(async channel =>
/// </summary>
public IDictionary<string, object> Arguments { get; } = new Dictionary<string, object>();

/// <summary>
/// Arguments for Rabbit MQ channel consume operations
/// </summary>
public IDictionary<string, object?> ConsumerArguments { get; } = new Dictionary<string, object?>();

/// <summary>
/// Create a "time to live" limit for messages in this queue. Sets the Rabbit MQ x-message-ttl argument on a queue
/// </summary>
Expand Down
Loading