Skip to content

Commit 0780ef3

Browse files
author
Simon MacMullen
committed
Merge bug23896
2 parents 31a8875 + 09bfcef commit 0780ef3

File tree

4 files changed

+33
-7
lines changed

4 files changed

+33
-7
lines changed

docs/wikipages/data.ApiOverview.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,7 @@ follows:
223223
channel.BasicPublish(exchangeName, routingKey, null, messageBodyBytes);
224224

225225
For fine control, you can use overloaded variants to specify the
226-
mandatory and immediate flags, or send messages with basic-class
227-
header properties:
226+
mandatory flag, or send messages with basic-class header properties:
228227

229228
@code java
230229
byte[] messageBodyBytes = System.Text.Encoding.UTF8.GetBytes("Hello, world!");

docs/wikipages/data.MessagingPatterns.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ Since published messages are returned to clients via AMQP's [code
107107
basic.return] method, and [code basic.return] is an asynchronous
108108
negative-acknowledgement event, the [i absence] of a [code
109109
basic.return] for a particular message cannot be taken as a
110-
confirmation of delivery: the use of "mandatory" and "immediate" only
111-
provides a way of raising the bar, rather than eliminating failure
112-
entirely.
110+
confirmation of delivery: the use of delivery flags only provides a
111+
way of raising the bar, rather than eliminating failure entirely.
113112

114-
When using "mandatory" or "immediate", it's important to be aware that
115-
different AMQP servers implement the flags in different ways,
113+
When using delivery flags it is important to be aware that different
114+
AMQP servers implement the flags in different ways. For example, the
115+
RabbitMQ server does not support the "immediate" flag. Furthermore,
116116
depending on the degree of internal asynchrony and distribution that
117117
those servers exhibit. In particular, the interpretation of
118118
"mandatory" and "immediate" in situations where [code Tx]-class

projects/client/RabbitMQ.Client/src/client/api/IModel.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,22 @@ void BasicPublish(string exchange,
454454
IBasicProperties basicProperties,
455455
byte[] body);
456456

457+
///<summary>(Spec method) Convenience overload of BasicPublish.</summary>
458+
///<remarks>
459+
///The publication occurs with immediate=false.
460+
///</remarks>
461+
[AmqpMethodDoNotImplement(null)]
462+
void BasicPublish(string exchange,
463+
string routingKey,
464+
bool mandatory,
465+
IBasicProperties basicProperties,
466+
byte[] body);
467+
457468
///<summary>(Spec method) Publish a message using the Basic
458469
///content-class.</summary>
470+
///<remarks>
471+
///Note that the RabbitMQ server does not support the 'immediate' flag.
472+
///</remarks>
459473
[AmqpMethodDoNotImplement(null)]
460474
void BasicPublish(string exchange,
461475
string routingKey,

projects/client/RabbitMQ.Client/src/client/impl/ModelBase.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,19 @@ public void BasicPublish(string exchange,
12441244
BasicPublish(exchange,
12451245
routingKey,
12461246
false,
1247+
basicProperties,
1248+
body);
1249+
}
1250+
1251+
public void BasicPublish(string exchange,
1252+
string routingKey,
1253+
bool mandatory,
1254+
IBasicProperties basicProperties,
1255+
byte[] body)
1256+
{
1257+
BasicPublish(exchange,
1258+
routingKey,
1259+
mandatory,
12471260
false,
12481261
basicProperties,
12491262
body);

0 commit comments

Comments
 (0)