public interface IModel
Known direct subtypes:
AutorecoveringModel
, IFullModel
, ModelBase
Summary
Common AMQP model, spanning the union of the
functionality offered by versions 0-8, 0-8qpid, 0-9 and 0-9-1 of AMQP.
Remarks
Extends the interface, so that the "using"
statement can be used to scope the lifetime of a channel when appropriate.
Property Summary
int
|
ChannelNumber (r)
|
Channel number, unique per connections.
|
ShutdownEventArgs |
CloseReason (r)
|
Returns null if the session is still in a state where it can be used,
or the cause of its closure otherwise.
|
TimeSpan
|
ContinuationTimeout (rw)
|
Amount of time protocol operations (e.g. queue.declare ) are allowed to take before
timing out.
|
IBasicConsumer |
DefaultConsumer (rw)
|
Signalled when an unexpected message is delivered
Under certain circumstances it is possible for a channel to receive a
message delivery which does not match any consumer which is currently
set up via basicConsume(). This will occur after the following sequence
of events:
ctag = basicConsume(queue, consumer); // i.e. with explicit acks
// some deliveries take place but are not acked
basicCancel(ctag);
basicRecover(false);
Since requeue is specified to be false in the basicRecover, the spec
states that the message must be redelivered to "the original recipient"
- i.e. the same channel / consumer-tag. But the consumer is no longer
active.
In these circumstances, you can register a default consumer to handle
such deliveries. If no default consumer is registered an
InvalidOperationException will be thrown when such a delivery arrives.
Most people will not need to use this. |
bool
|
IsClosed (r)
|
Returns true if the model is no longer in a state where it can be used.
|
bool
|
IsOpen (r)
|
Returns true if the model is still in a state where it can be used.
Identical to checking if equals null. |
ulong
|
NextPublishSeqNo (r)
|
When in confirm mode, return the sequence number of the next message to be published.
|
Event Summary
EventHandler<BasicAckEventArgs>
|
BasicAcks |
Signalled when a Basic.Ack command arrives from the broker.
|
EventHandler<BasicNackEventArgs>
|
BasicNacks |
Signalled when a Basic.Nack command arrives from the broker.
|
EventHandler<EventArgs>
|
BasicRecoverOk |
All messages received before this fires that haven't been ack'ed will be redelivered.
All messages received afterwards won't be.
|
EventHandler<BasicReturnEventArgs>
|
BasicReturn |
Signalled when a Basic.Return command arrives from the broker.
|
EventHandler<CallbackExceptionEventArgs>
|
CallbackException |
Signalled when an exception occurs in a callback invoked by the model.
Examples of cases where this event will be signalled
include exceptions thrown in methods, or
exceptions thrown in delegates etc.
|
EventHandler<FlowControlEventArgs>
|
FlowControl |
(undocumented) |
EventHandler<ShutdownEventArgs>
|
ModelShutdown |
Notifies the destruction of the model.
|
Method Summary
void Abort()
|
Abort this session.
|
void Abort(ushort replyCode, string replyText)
|
Abort this session.
|
void BasicAck(ulong deliveryTag, bool multiple)
|
Acknowledge one or more delivered message(s).
|
void BasicCancel(string consumerTag)
|
Delete a Basic content-class consumer.
|
string BasicConsume(string queue, bool noAck, string consumerTag, bool noLocal, bool exclusive, IDictionary<string,object> arguments, IBasicConsumer consumer)
|
Start a Basic content-class consumer. |
string BasicConsume(string queue, bool noAck, string consumerTag, IDictionary<string,object> arguments, IBasicConsumer consumer)
|
Start a Basic content-class consumer. |
string BasicConsume(string queue, bool noAck, string consumerTag, IBasicConsumer consumer)
|
Start a Basic content-class consumer. |
string BasicConsume(string queue, bool noAck, IBasicConsumer consumer)
|
Start a Basic content-class consumer. |
BasicGetResult BasicGet(string queue, bool noAck)
|
Retrieve an individual message, if
one is available; returns null if the server answers that
no messages are currently available. See also .
|
void BasicNack(ulong deliveryTag, bool multiple, bool requeue)
|
Reject one or more delivered message(s). |
void BasicPublish(string exchange, string routingKey, IBasicProperties basicProperties, byte[] body)
|
Convenience overload of BasicPublish.
|
void BasicPublish(string exchange, string routingKey, bool mandatory, IBasicProperties basicProperties, byte[] body)
|
Convenience overload of BasicPublish.
|
void BasicPublish(PublicationAddress addr, IBasicProperties basicProperties, byte[] body)
|
Convenience overload of BasicPublish.
|
void BasicQos(uint prefetchSize, ushort prefetchCount, bool global)
|
Configures QoS parameters of the Basic content-class.
|
void BasicRecover(bool requeue)
|
(Spec method).
|
void BasicRecoverAsync(bool requeue)
|
(Spec method).
|
void BasicReject(ulong deliveryTag, bool requeue)
|
Reject a delivered message. |
void Close()
|
Close this session. |
void Close(ushort replyCode, string replyText)
|
Close this session. |
void ConfirmSelect()
|
Enable publisher acknowledgements.
|
uint ConsumerCount(string queue)
|
Returns the number of consumers on a queue.
This method assumes the queue exists. If it doesn't,
an exception will be closed with an exception.
|
IBasicProperties CreateBasicProperties()
|
Construct a completely empty content header for use with the Basic content class.
|
void ExchangeBind(string destination, string source, string routingKey, IDictionary<string,object> arguments)
|
Bind an exchange to an exchange.
|
void ExchangeBind(string destination, string source, string routingKey)
|
Bind an exchange to an exchange.
|
void ExchangeBindNoWait(string destination, string source, string routingKey, IDictionary<string,object> arguments)
|
Like ExchangeBind but sets nowait to true.
|
void ExchangeDeclare(string exchange, string type)
|
Declare an exchange.
|
void ExchangeDeclare(string exchange, string type, bool durable)
|
Declare an exchange.
|
void ExchangeDeclare(string exchange, string type, bool durable, bool autoDelete, IDictionary<string,object> arguments)
|
Declare an exchange. |
void ExchangeDeclareNoWait(string exchange, string type, bool durable, bool autoDelete, IDictionary<string,object> arguments)
|
Same as ExchangeDeclare but sets nowait to true and returns void (as there
will be no response from the server).
|
void ExchangeDeclarePassive(string exchange)
|
Declare an exchange.
|
void ExchangeDelete(string exchange, bool ifUnused)
|
Delete an exchange.
|
void ExchangeDelete(string exchange)
|
Delete an exchange. |
void ExchangeDeleteNoWait(string exchange, bool ifUnused)
|
Like ExchangeDelete but sets nowait to true.
|
void ExchangeUnbind(string destination, string source, string routingKey, IDictionary<string,object> arguments)
|
Unbind an exchange from an exchange.
|
void ExchangeUnbind(string destination, string source, string routingKey)
|
Unbind an exchange from an exchange.
|
void ExchangeUnbindNoWait(string destination, string source, string routingKey, IDictionary<string,object> arguments)
|
Like ExchangeUnbind but sets nowait to true.
|
uint MessageCount(string queue)
|
Returns the number of messages in a queue ready to be delivered
to consumers. This method assumes the queue exists. If it doesn't,
an exception will be closed with an exception.
|
void QueueBind(string queue, string exchange, string routingKey, IDictionary<string,object> arguments)
|
Bind a queue to an exchange.
|
void QueueBind(string queue, string exchange, string routingKey)
|
Bind a queue to an exchange. |
void QueueBindNoWait(string queue, string exchange, string routingKey, IDictionary<string,object> arguments)
|
Same as QueueBind but sets nowait parameter to true. |
QueueDeclareOk QueueDeclare(string queue, bool durable, bool exclusive, bool autoDelete, IDictionary<string,object> arguments)
|
Declare a queue. |
QueueDeclareOk QueueDeclare()
|
Declare a queue. |
void QueueDeclareNoWait(string queue, bool durable, bool exclusive, bool autoDelete, IDictionary<string,object> arguments)
|
Same as QueueDeclare but sets nowait to true and returns void (as there
will be no response from the server).
|
QueueDeclareOk QueueDeclarePassive(string queue)
|
Declare a queue passively. |
uint QueueDelete(string queue, bool ifUnused, bool ifEmpty)
|
Delete a queue.
|
uint QueueDelete(string queue)
|
Delete a queue.
|
void QueueDeleteNoWait(string queue, bool ifUnused, bool ifEmpty)
|
Same as QueueDelete but sets nowait parameter to true
and returns void (as there will be no response from the server)
|
uint QueuePurge(string queue)
|
Purge a queue of messages.
|
void QueueUnbind(string queue, string exchange, string routingKey, IDictionary<string,object> arguments)
|
Unbind a queue from an exchange.
|
void TxCommit()
|
Commit this session's active TX transaction.
|
void TxRollback()
|
Roll back this session's active TX transaction.
|
void TxSelect()
|
Enable TX mode for this session.
|
bool WaitForConfirms()
|
Wait until all published messages have been confirmed.
|
bool WaitForConfirms(TimeSpan timeout)
|
Wait until all published messages have been confirmed.
|
bool WaitForConfirms(TimeSpan timeout, out bool timedOut)
|
Wait until all published messages have been confirmed.
|
void WaitForConfirmsOrDie()
|
Wait until all published messages have been confirmed.
|
void WaitForConfirmsOrDie(TimeSpan timeout)
|
Wait until all published messages have been confirmed.
|
Property Detail
int ChannelNumber (r)
Summary
Channel number, unique per connections.
ShutdownEventArgs CloseReason (r)
Summary
Returns null if the session is still in a state where it can be used,
or the cause of its closure otherwise.
TimeSpan ContinuationTimeout (rw)
Summary
Amount of time protocol operations (e.g.
queue.declare
) are allowed to take before
timing out.
IBasicConsumer DefaultConsumer (rw)
Summary
Signalled when an unexpected message is delivered
Under certain circumstances it is possible for a channel to receive a
message delivery which does not match any consumer which is currently
set up via basicConsume(). This will occur after the following sequence
of events:
ctag = basicConsume(queue, consumer); // i.e. with explicit acks
// some deliveries take place but are not acked
basicCancel(ctag);
basicRecover(false);
Since requeue is specified to be false in the basicRecover, the spec
states that the message must be redelivered to "the original recipient"
- i.e. the same channel / consumer-tag. But the consumer is no longer
active.
In these circumstances, you can register a default consumer to handle
such deliveries. If no default consumer is registered an
InvalidOperationException will be thrown when such a delivery arrives.
Most people will not need to use this.
bool IsClosed (r)
Summary
Returns true if the model is no longer in a state where it can be used.
bool IsOpen (r)
Summary
Returns true if the model is still in a state where it can be used.
Identical to checking if equals null.
ulong NextPublishSeqNo (r)
Summary
When in confirm mode, return the sequence number of the next message to be published.
Event Detail
EventHandler<BasicAckEventArgs> BasicAcks
Summary
Signalled when a Basic.Ack command arrives from the broker.
EventHandler<BasicNackEventArgs> BasicNacks
Summary
Signalled when a Basic.Nack command arrives from the broker.
EventHandler<EventArgs> BasicRecoverOk
Summary
All messages received before this fires that haven't been ack'ed will be redelivered.
All messages received afterwards won't be.
Remarks
Handlers for this event are invoked by the connection thread.
It is sometimes useful to allow that thread to know that a recover-ok
has been received, rather than the thread that invoked .
EventHandler<BasicReturnEventArgs> BasicReturn
Summary
Signalled when a Basic.Return command arrives from the broker.
EventHandler<CallbackExceptionEventArgs> CallbackException
Summary
Signalled when an exception occurs in a callback invoked by the model.
Examples of cases where this event will be signalled
include exceptions thrown in methods, or
exceptions thrown in delegates etc.
EventHandler<FlowControlEventArgs> FlowControl
EventHandler<ShutdownEventArgs> ModelShutdown
Summary
Notifies the destruction of the model.
Remarks
If the model is already destroyed at the time an event
handler is added to this event, the event handler will be fired immediately.
Method Detail
Abort
void Abort()
Summary
Abort this session.
Remarks
If the session is already closed (or closing), then this
method does nothing but wait for the in-progress close
operation to complete. This method will not return to the
caller until the shutdown is complete.
In comparison to normal method, will not throw
or or any other during closing model.
Abort
void Abort(ushort replyCode, string replyText)
void
|
replyCode |
ushort
|
replyText |
string
|
|
Summary
Abort this session.
Remarks
The method behaves in the same way as
, with the only
difference that the model is closed with the given model close code and message.
The close code (See under "Reply Codes" in the AMQP specification)
A message indicating the reason for closing the model
BasicAck
void BasicAck(ulong deliveryTag, bool multiple)
void
|
deliveryTag |
ulong
|
multiple |
bool
|
|
Summary
Acknowledge one or more delivered message(s).
BasicCancel
void BasicCancel(string consumerTag)
Summary
Delete a Basic content-class consumer.
BasicConsume
string BasicConsume(string queue, bool noAck, string consumerTag, bool noLocal, bool exclusive, IDictionary<string,object> arguments, IBasicConsumer consumer)
string
|
queue |
string
|
noAck |
bool
|
consumerTag |
string
|
noLocal |
bool
|
exclusive |
bool
|
arguments |
IDictionary<string,object>
|
consumer |
IBasicConsumer |
|
Summary
Start a Basic content-class consumer.
BasicConsume
string BasicConsume(string queue, bool noAck, string consumerTag, IDictionary<string,object> arguments, IBasicConsumer consumer)
string
|
queue |
string
|
noAck |
bool
|
consumerTag |
string
|
arguments |
IDictionary<string,object>
|
consumer |
IBasicConsumer |
|
Summary
Start a Basic content-class consumer.
Remarks
The consumer is started with noLocal=false and exclusive=false.
BasicConsume
string BasicConsume(string queue, bool noAck, string consumerTag, IBasicConsumer consumer)
Summary
Start a Basic content-class consumer.
Remarks
The consumer is started with
an empty consumer tag (i.e. the server creates and returns a fresh consumer tag),
noLocal=false and exclusive=false.
BasicConsume
string BasicConsume(string queue, bool noAck, IBasicConsumer consumer)
Summary
Start a Basic content-class consumer.
Remarks
The consumer is started with noAck=false (i.e. BasicAck is required),
an empty consumer tag (i.e. the server creates and returns a fresh consumer tag),
noLocal=false and exclusive=false.
BasicGet
BasicGetResult BasicGet(string queue, bool noAck)
Summary
Retrieve an individual message, if
one is available; returns null if the server answers that
no messages are currently available. See also .
BasicNack
void BasicNack(ulong deliveryTag, bool multiple, bool requeue)
void
|
deliveryTag |
ulong
|
multiple |
bool
|
requeue |
bool
|
|
Summary
Reject one or more delivered message(s).
BasicPublish
void BasicPublish(string exchange, string routingKey, IBasicProperties basicProperties, byte[] body)
Summary
Convenience overload of BasicPublish.
Remarks
The publication occurs with mandatory=false
BasicPublish
void BasicPublish(string exchange, string routingKey, bool mandatory, IBasicProperties basicProperties, byte[] body)
void
|
exchange |
string
|
routingKey |
string
|
mandatory |
bool
|
basicProperties |
IBasicProperties |
body |
byte[]
|
|
Summary
Convenience overload of BasicPublish.
BasicPublish
void BasicPublish(PublicationAddress addr, IBasicProperties basicProperties, byte[] body)
Summary
Convenience overload of BasicPublish.
Remarks
The publication occurs with mandatory=false and immediate=false.
BasicQos
void BasicQos(uint prefetchSize, ushort prefetchCount, bool global)
void
|
prefetchSize |
uint
|
prefetchCount |
ushort
|
global |
bool
|
|
Summary
Configures QoS parameters of the Basic content-class.
BasicRecover
void BasicRecover(bool requeue)
BasicRecoverAsync
void BasicRecoverAsync(bool requeue)
BasicReject
void BasicReject(ulong deliveryTag, bool requeue)
void
|
deliveryTag |
ulong
|
requeue |
bool
|
|
Summary
Reject a delivered message.
Close
void Close()
Summary
Close this session.
Remarks
If the session is already closed (or closing), then this
method does nothing but wait for the in-progress close
operation to complete. This method will not return to the
caller until the shutdown is complete.
Close
void Close(ushort replyCode, string replyText)
void
|
replyCode |
ushort
|
replyText |
string
|
|
Summary
Close this session.
Remarks
The method behaves in the same way as Close(), with the only
difference that the model is closed with the given model
close code and message.
The close code (See under "Reply Codes" in the AMQP specification)
A message indicating the reason for closing the model
ConfirmSelect
void ConfirmSelect()
Summary
Enable publisher acknowledgements.
ConsumerCount
uint ConsumerCount(string queue)
Summary
Returns the number of consumers on a queue.
This method assumes the queue exists. If it doesn't,
an exception will be closed with an exception.
Param
The name of the queue
CreateBasicProperties
IBasicProperties CreateBasicProperties()
Summary
Construct a completely empty content header for use with the Basic content class.
ExchangeBind
void ExchangeBind(string destination, string source, string routingKey, IDictionary<string,object> arguments)
void
|
destination |
string
|
source |
string
|
routingKey |
string
|
arguments |
IDictionary<string,object>
|
|
Summary
Bind an exchange to an exchange.
Remarks
Routing key must be shorter than 255 bytes.
ExchangeBind
void ExchangeBind(string destination, string source, string routingKey)
void
|
destination |
string
|
source |
string
|
routingKey |
string
|
|
Summary
Bind an exchange to an exchange.
Remarks
Routing key must be shorter than 255 bytes.
ExchangeBindNoWait
void ExchangeBindNoWait(string destination, string source, string routingKey, IDictionary<string,object> arguments)
void
|
destination |
string
|
source |
string
|
routingKey |
string
|
arguments |
IDictionary<string,object>
|
|
Summary
Like ExchangeBind but sets nowait to true.
Remarks
Routing key must be shorter than 255 bytes.
ExchangeDeclare
void ExchangeDeclare(string exchange, string type)
void
|
exchange |
string
|
type |
string
|
|
Summary
Declare an exchange.
Remarks
The exchange is declared non-passive, non-durable, non-autodelete, and
non-internal, with no arguments. The "nowait" option is not exercised.
ExchangeDeclare
void ExchangeDeclare(string exchange, string type, bool durable)
void
|
exchange |
string
|
type |
string
|
durable |
bool
|
|
Summary
Declare an exchange.
Remarks
The exchange is declared non-passive, non-autodelete, and
non-internal, with no arguments. The "nowait" option is not exercised.
ExchangeDeclare
void ExchangeDeclare(string exchange, string type, bool durable, bool autoDelete, IDictionary<string,object> arguments)
void
|
exchange |
string
|
type |
string
|
durable |
bool
|
autoDelete |
bool
|
arguments |
IDictionary<string,object>
|
|
Summary
Declare an exchange.
Remarks
The exchange is declared non-passive and non-internal.
The "nowait" option is not exercised.
ExchangeDeclareNoWait
void ExchangeDeclareNoWait(string exchange, string type, bool durable, bool autoDelete, IDictionary<string,object> arguments)
void
|
exchange |
string
|
type |
string
|
durable |
bool
|
autoDelete |
bool
|
arguments |
IDictionary<string,object>
|
|
Summary
Same as ExchangeDeclare but sets nowait to true and returns void (as there
will be no response from the server).
ExchangeDeclarePassive
void ExchangeDeclarePassive(string exchange)
Summary
Declare an exchange.
Remarks
The exchange is declared passive.
ExchangeDelete
void ExchangeDelete(string exchange, bool ifUnused)
void
|
exchange |
string
|
ifUnused |
bool
|
|
Summary
Delete an exchange.
ExchangeDelete
void ExchangeDelete(string exchange)
Summary
Delete an exchange.
Remarks
The exchange is deleted regardless of any queue bindings.
ExchangeDeleteNoWait
void ExchangeDeleteNoWait(string exchange, bool ifUnused)
void
|
exchange |
string
|
ifUnused |
bool
|
|
Summary
Like ExchangeDelete but sets nowait to true.
ExchangeUnbind
void ExchangeUnbind(string destination, string source, string routingKey, IDictionary<string,object> arguments)
void
|
destination |
string
|
source |
string
|
routingKey |
string
|
arguments |
IDictionary<string,object>
|
|
Summary
Unbind an exchange from an exchange.
Remarks
Routing key must be shorter than 255 bytes.
ExchangeUnbind
void ExchangeUnbind(string destination, string source, string routingKey)
void
|
destination |
string
|
source |
string
|
routingKey |
string
|
|
Summary
Unbind an exchange from an exchange.
Remarks
Routing key must be shorter than 255 bytes.
ExchangeUnbindNoWait
void ExchangeUnbindNoWait(string destination, string source, string routingKey, IDictionary<string,object> arguments)
void
|
destination |
string
|
source |
string
|
routingKey |
string
|
arguments |
IDictionary<string,object>
|
|
Summary
Like ExchangeUnbind but sets nowait to true.
MessageCount
uint MessageCount(string queue)
Summary
Returns the number of messages in a queue ready to be delivered
to consumers. This method assumes the queue exists. If it doesn't,
an exception will be closed with an exception.
Param
The name of the queue
QueueBind
void QueueBind(string queue, string exchange, string routingKey, IDictionary<string,object> arguments)
void
|
queue |
string
|
exchange |
string
|
routingKey |
string
|
arguments |
IDictionary<string,object>
|
|
Summary
Bind a queue to an exchange.
Remarks
Routing key must be shorter than 255 bytes.
QueueBind
void QueueBind(string queue, string exchange, string routingKey)
void
|
queue |
string
|
exchange |
string
|
routingKey |
string
|
|
Summary
Bind a queue to an exchange.
Remarks
Routing key must be shorter than 255 bytes.
QueueBindNoWait
void QueueBindNoWait(string queue, string exchange, string routingKey, IDictionary<string,object> arguments)
void
|
queue |
string
|
exchange |
string
|
routingKey |
string
|
arguments |
IDictionary<string,object>
|
|
Summary
Same as QueueBind but sets nowait parameter to true.
Remarks
Routing key must be shorter than 255 bytes.
QueueDeclare
QueueDeclareOk QueueDeclare(string queue, bool durable, bool exclusive, bool autoDelete, IDictionary<string,object> arguments)
QueueDeclareOk |
queue |
string
|
durable |
bool
|
exclusive |
bool
|
autoDelete |
bool
|
arguments |
IDictionary<string,object>
|
|
QueueDeclare
QueueDeclareOk QueueDeclare()
Remarks
The queue is declared non-passive, non-durable,
but exclusive and autodelete, with no arguments. The
server autogenerates a name for the queue - the generated name is the return value of this method.
QueueDeclareNoWait
void QueueDeclareNoWait(string queue, bool durable, bool exclusive, bool autoDelete, IDictionary<string,object> arguments)
void
|
queue |
string
|
durable |
bool
|
exclusive |
bool
|
autoDelete |
bool
|
arguments |
IDictionary<string,object>
|
|
Summary
Same as QueueDeclare but sets nowait to true and returns void (as there
will be no response from the server).
QueueDeclarePassive
QueueDeclareOk QueueDeclarePassive(string queue)
Summary
Declare a queue passively.
Remarks
The queue is declared passive, non-durable,
non-exclusive, and non-autodelete, with no arguments.
The queue is declared passively; i.e. only check if it exists.
QueueDelete
uint QueueDelete(string queue, bool ifUnused, bool ifEmpty)
uint
|
queue |
string
|
ifUnused |
bool
|
ifEmpty |
bool
|
|
Remarks
Returns the number of messages purged during queue deletion.
uint.MaxValue
.
QueueDelete
uint QueueDelete(string queue)
Remarks
Returns the number of messages purged during queue deletion.
QueueDeleteNoWait
void QueueDeleteNoWait(string queue, bool ifUnused, bool ifEmpty)
void
|
queue |
string
|
ifUnused |
bool
|
ifEmpty |
bool
|
|
Summary
Same as QueueDelete but sets nowait parameter to true
and returns void (as there will be no response from the server)
QueuePurge
uint QueuePurge(string queue)
Summary
Purge a queue of messages.
Remarks
Returns the number of messages purged.
QueueUnbind
void QueueUnbind(string queue, string exchange, string routingKey, IDictionary<string,object> arguments)
void
|
queue |
string
|
exchange |
string
|
routingKey |
string
|
arguments |
IDictionary<string,object>
|
|
Summary
Unbind a queue from an exchange.
TxCommit
void TxCommit()
Summary
Commit this session's active TX transaction.
TxRollback
void TxRollback()
Summary
Roll back this session's active TX transaction.
TxSelect
void TxSelect()
Summary
Enable TX mode for this session.
WaitForConfirms
bool WaitForConfirms()
Summary
Wait until all published messages have been confirmed.
Remarks
Waits until all messages published since the last call have
been either ack'd or nack'd by the broker. Returns whether
all the messages were ack'd (and none were nack'd). Note,
throws an exception when called on a non-Confirm channel.
WaitForConfirms
bool WaitForConfirms(TimeSpan timeout)
Summary
Wait until all published messages have been confirmed.
Returns
True if no nacks were received within the timeout, otherwise false.
Param
How long to wait (at most) before returning
whether or not any nacks were returned.
Remarks
Waits until all messages published since the last call have
been either ack'd or nack'd by the broker. Returns whether
all the messages were ack'd (and none were nack'd). Note,
throws an exception when called on a non-Confirm channel.
WaitForConfirms
bool WaitForConfirms(TimeSpan timeout, out bool timedOut)
bool
|
timeout |
TimeSpan
|
timedOut |
out bool
|
|
Summary
Wait until all published messages have been confirmed.
Returns
True if no nacks were received within the timeout, otherwise false.
Param
How long to wait (at most) before returning
whether or not any nacks were returned.
Param
True if the method returned because
the timeout elapsed, not because all messages were ack'd or at least one nack'd.
Remarks
Waits until all messages published since the last call have
been either ack'd or nack'd by the broker. Returns whether
all the messages were ack'd (and none were nack'd). Note,
throws an exception when called on a non-Confirm channel.
WaitForConfirmsOrDie
void WaitForConfirmsOrDie()
Summary
Wait until all published messages have been confirmed.
Remarks
Waits until all messages published since the last call have
been ack'd by the broker. If a nack is received, throws an
OperationInterrupedException exception immediately.
WaitForConfirmsOrDie
void WaitForConfirmsOrDie(TimeSpan timeout)
Summary
Wait until all published messages have been confirmed.
Remarks
Waits until all messages published since the last call have
been ack'd by the broker. If a nack is received or the timeout
elapses, throws an OperationInterrupedException exception immediately.