Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spike an exception based approach #1698

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
10 changes: 6 additions & 4 deletions projects/RabbitMQ.Client/IChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,12 @@ Task<string> BasicConsumeAsync(string queue, bool autoAck, string consumerTag, b
/// <param name="basicProperties">The message properties.</param>
/// <param name="body">The message body.</param>
/// <param name="cancellationToken">CancellationToken for this operation.</param>
/// <returns>Returns <c>true</c> if publisher confirmations enabled and the message was ack-ed</returns>
/// <remarks>
/// Routing key must be shorter than 255 bytes.
/// TODO
/// Throws <see cref="Exception"/> if a nack or basic.return is returned for the message.
/// </remarks>
ValueTask<bool> BasicPublishAsync<TProperties>(string exchange, string routingKey,
ValueTask BasicPublishAsync<TProperties>(string exchange, string routingKey,
bool mandatory, TProperties basicProperties, ReadOnlyMemory<byte> body,
CancellationToken cancellationToken = default)
where TProperties : IReadOnlyBasicProperties, IAmqpHeader;
Expand All @@ -220,11 +221,12 @@ ValueTask<bool> BasicPublishAsync<TProperties>(string exchange, string routingKe
/// <param name="basicProperties">The message properties.</param>
/// <param name="body">The message body.</param>
/// <param name="cancellationToken">CancellationToken for this operation.</param>
/// <returns>Returns <c>true</c> if publisher confirmations enabled and the message was ack-ed</returns>
/// <remarks>
/// Routing key must be shorter than 255 bytes.
/// TODO
/// Throws <see cref="Exception"/> if a nack or basic.return is returned for the message.
/// </remarks>
ValueTask<bool> BasicPublishAsync<TProperties>(CachedString exchange, CachedString routingKey,
ValueTask BasicPublishAsync<TProperties>(CachedString exchange, CachedString routingKey,
bool mandatory, TProperties basicProperties, ReadOnlyMemory<byte> body,
CancellationToken cancellationToken = default)
where TProperties : IReadOnlyBasicProperties, IAmqpHeader;
Expand Down
10 changes: 5 additions & 5 deletions projects/RabbitMQ.Client/IChannelExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static Task<string> BasicConsumeAsync(this IChannel channel,
/// <remarks>
/// The publication occurs with mandatory=false.
/// </remarks>
public static ValueTask<bool> BasicPublishAsync<T>(this IChannel channel,
public static ValueTask BasicPublishAsync<T>(this IChannel channel,
PublicationAddress addr,
T basicProperties,
ReadOnlyMemory<byte> body,
Expand All @@ -94,7 +94,7 @@ public static ValueTask<bool> BasicPublishAsync<T>(this IChannel channel,
/// <remarks>
/// The publication occurs with mandatory=false and empty BasicProperties
/// </remarks>
public static ValueTask<bool> BasicPublishAsync(this IChannel channel,
public static ValueTask BasicPublishAsync(this IChannel channel,
string exchange,
string routingKey,
ReadOnlyMemory<byte> body,
Expand All @@ -109,7 +109,7 @@ public static ValueTask<bool> BasicPublishAsync(this IChannel channel,
/// <remarks>
/// The publication occurs with mandatory=false and empty BasicProperties
/// </remarks>
public static ValueTask<bool> BasicPublishAsync(this IChannel channel,
public static ValueTask BasicPublishAsync(this IChannel channel,
CachedString exchange,
CachedString routingKey,
ReadOnlyMemory<byte> body,
Expand All @@ -124,7 +124,7 @@ public static ValueTask<bool> BasicPublishAsync(this IChannel channel,
/// <remarks>
/// The publication occurs with empty BasicProperties
/// </remarks>
public static ValueTask<bool> BasicPublishAsync(this IChannel channel,
public static ValueTask BasicPublishAsync(this IChannel channel,
string exchange,
string routingKey,
bool mandatory,
Expand All @@ -140,7 +140,7 @@ public static ValueTask<bool> BasicPublishAsync(this IChannel channel,
/// <remarks>
/// The publication occurs with empty BasicProperties
/// </remarks>
public static ValueTask<bool> BasicPublishAsync(this IChannel channel,
public static ValueTask BasicPublishAsync(this IChannel channel,
CachedString exchange,
CachedString routingKey,
bool mandatory,
Expand Down
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client/Impl/AutorecoveringChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,15 +311,15 @@ await _connection.RecordConsumerAsync(rc, recordedEntitiesSemaphoreHeld: false)
public Task<BasicGetResult?> BasicGetAsync(string queue, bool autoAck, CancellationToken cancellationToken)
=> InnerChannel.BasicGetAsync(queue, autoAck, cancellationToken);

public ValueTask<bool> BasicPublishAsync<TProperties>(string exchange, string routingKey,
public ValueTask BasicPublishAsync<TProperties>(string exchange, string routingKey,
bool mandatory,
TProperties basicProperties,
ReadOnlyMemory<byte> body,
CancellationToken cancellationToken = default)
where TProperties : IReadOnlyBasicProperties, IAmqpHeader
=> InnerChannel.BasicPublishAsync(exchange, routingKey, mandatory, basicProperties, body, cancellationToken);

public ValueTask<bool> BasicPublishAsync<TProperties>(CachedString exchange, CachedString routingKey,
public ValueTask BasicPublishAsync<TProperties>(CachedString exchange, CachedString routingKey,
bool mandatory,
TProperties basicProperties,
ReadOnlyMemory<byte> body,
Expand Down
Loading