RabbitMQ.Client Represents a TCP-addressable AMQP peer: a host name and port number. Some of the constructors take, as a convenience, a System.Uri instance representing an AMQP server address. The use of Uri here is not standardised - Uri is simply a convenient container for internet-address-like components. In particular, the Uri "Scheme" property is ignored: only the "Host" and "Port" properties are extracted. Default Amqp ssl port. Indicates that the default port for the protocol should be used. Creates a new instance of the . Hostname. Port number. If the port number is -1, the default port number will be used. Ssl option. Creates a new instance of the . Hostname. Port number. If the port number is -1, the default port number will be used. Construct an AmqpTcpEndpoint with "localhost" as the hostname, and using the default port. Creates a new instance of the with the given Uri and ssl options. Please see the class overview documentation for information about the Uri format in use. Creates a new instance of the with the given Uri. Please see the class overview documentation for information about the Uri format in use. Clones the endpoint. A copy with the same hostname, port, and TLS settings Clones the endpoint using the provided hostname. Hostname to use A copy with the provided hostname and port/TLS settings of this endpoint Retrieve or set the hostname of this . Retrieve or set the port number of this AmqpTcpEndpoint. A port number of -1 causes the default port number. Retrieve IProtocol of this . Used to force the address family of the endpoint. Use to force to IPv4. Use to force to IPv6. Or use to attempt both IPv6 and IPv4. Retrieve the TLS options for this AmqpTcpEndpoint. If not set, null is returned. Construct an instance from a protocol and an address in "hostname:port" format. If the address string passed in contains ":", it is split into a hostname and a port-number part. Otherwise, the entire string is used as the hostname, and the port-number is set to -1 (meaning the default number for the protocol variant specified). Hostnames provided as IPv6 must appear in square brackets ([]). Splits the passed-in string on ",", and passes the substrings to . Accepts a string of the form "hostname:port, hostname:port, ...", where the ":port" pieces are optional, and returns a corresponding array of s. Compares this instance by value (protocol, hostname, port) against another instance. Implementation of hash code depending on protocol, hostname and port, to line up with the implementation of . Returns a URI-like string of the form amqp-PROTOCOL://HOSTNAME:PORTNUMBER. This method is intended mainly for debugging and logging use. Structure holding an AMQP timestamp, a posix 64-bit time_t. When converting between an AmqpTimestamp and a System.DateTime, be aware of the effect of your local timezone. In particular, different versions of the .NET framework assume different defaults. We have chosen a signed 64-bit time_t here, since the AMQP specification through versions 0-9 is silent on whether timestamps are signed or unsigned. Construct an . Unix time. Unix time. Provides a debugger-friendly display. Creates a new instance of an . Constructor which sets the Model property to the given value. Common AMQP model. Retrieve the consumer tags this consumer is registered as; to be used when discussing this consumer with the server, for instance with . Returns true while the consumer is registered and expecting deliveries from the broker. If our shuts down, this property will contain a description of the reason for the shutdown. Otherwise it will contain null. See . Signalled when the consumer gets cancelled. Retrieve the this consumer is associated with, for use in acknowledging received messages, for instance. Called when the consumer is cancelled for reasons other than by a basicCancel: e.g. the queue has been deleted (either by this channel or by any other channel). See for notification of consumer cancellation due to basicCancel Consumer tag this consumer is registered. Called upon successful deregistration of the consumer from the broker. Consumer tag this consumer is registered. Called upon successful registration of the consumer with the broker. Consumer tag this consumer is registered. Called each time a message is delivered for this consumer. This is a no-op implementation. It will not acknowledge deliveries via if consuming in automatic acknowledgement mode. Subclasses must copy or fully use delivery body before returning. Accessing the body at a later point is unsafe as its memory can be already released. Called when the model (channel) this consumer was registered on terminates. A channel this consumer was registered on. Shutdown context. Default implementation - overridable in subclasses. The set of consumer tags that where cancelled This default implementation simply sets the property to false, and takes no further action. Represents Basic.GetOk responses from the server. Basic.Get either returns an instance of this class, or null if a Basic.GetEmpty was received. Sets the new instance's properties from the arguments passed in. Delivery tag for the message. Redelivered flag for the message The exchange this message was published to. Routing key with which the message was published. The number of messages pending on the queue, excluding the message being delivered. The Basic-class content header properties for the message. Retrieves the Basic-class content header properties for this message. Retrieves the body of this message. Retrieve the delivery tag for this message. See also . Retrieve the exchange this message was published to. Retrieve the number of messages pending on the queue, excluding the message being delivered. Note that this figure is indicative, not reliable, and can change arbitrarily as messages are added to the queue and removed by other clients. Retrieve the redelivered flag for this message. Retrieve the routing key with which this message was published. Wrapper for a byte[]. May appear as values read from and written to AMQP field tables. The sole reason for the existence of this class is to permit encoding of byte[] as 'x' in AMQP field tables, an extension to the specification that is part of the tentative JMS mapping implemented by QPid. Instances of this object may be found as values held in IDictionary instances returned from RabbitMQ.Client.Impl.WireFormatting.ReadTable, e.g. as part of IBasicProperties.Headers tables. Likewise, instances may be set as values in an IDictionary table to be encoded by RabbitMQ.Client.Impl.WireFormatting.WriteTable. When an instance of this class is encoded/decoded, the type tag 'x' is used in the on-the-wire representation. The AMQP standard type tag 'S' is decoded to a raw byte[], and a raw byte[] is encoded as 'S'. Instances of System.String are converted to a UTF-8 binary representation, and then encoded using tag 'S'. In order to force the use of tag 'x', instances of this class must be used. Creates a new instance of the with null for its Bytes property. Creates a new instance of the . The wrapped byte array, as decoded or as to be encoded. The wrapped byte array, as decoded or as to be encoded. Main entry point to the RabbitMQ .NET AMQP client API. Constructs instances. A simple example of connecting to a broker: ConnectionFactory factory = new ConnectionFactory(); // // The next six lines are optional: factory.UserName = ConnectionFactory.DefaultUser; factory.Password = ConnectionFactory.DefaultPass; factory.VirtualHost = ConnectionFactory.DefaultVHost; factory.HostName = hostName; factory.Port = AmqpTcpEndpoint.UseDefaultPort; // IConnection conn = factory.CreateConnection(); // IModel ch = conn.CreateModel(); // // ... use ch's IModel methods ... // ch.Close(Constants.ReplySuccess, "Closing the channel"); conn.Close(Constants.ReplySuccess, "Closing the connection"); The same example, written more compactly with AMQP URIs: ConnectionFactory factory = new ConnectionFactory(); factory.SetUri("amqp://localhost"); IConnection conn = factory.CreateConnection(); ... Please see also the API overview and tutorial in the User Guide. Note that the Uri property takes a string representation of an AMQP URI. Omitted URI parts will take default values. The host part of the URI cannot be omitted and URIs of the form "amqp://foo/" (note the trailing slash) also represent the default virtual host. The latter issue means that virtual hosts with an empty name are not addressable. Default value for the desired maximum channel number. Default: 2047. Default value for connection attempt timeout. Default value for the desired maximum frame size. Default is 0 ("no limit"). Default value for desired heartbeat interval. Default is 60 seconds, TimeSpan.Zero means "heartbeats are disabled". Default password (value: "guest"). Default user name (value: "guest"). Default virtual host (value: "/"). TLS versions enabled by default: TLSv1.2, v1.1, v1.0. The AMQP URI SSL protocols. Default SASL auth mechanisms to use. SASL auth mechanisms to use. Address family used by default. Use to force to IPv4. Use to force to IPv6. Or use to attempt both IPv6 and IPv4. Set to false to disable automatic connection recovery. Defaults to true. Set to true will enable a asynchronous consumer dispatcher which is compatible with . Defaults to false. Set to a value greater than one to enable concurrent processing. For a concurrency greater than one will be offloaded to the worker thread pool so it is important to choose the value for the concurrency wisely to avoid thread pool overloading. can handle concurrency much more efficiently due to the non-blocking nature of the consumer. Defaults to 1. For concurrency greater than one this removes the guarantee that consumers handle messages in the order they receive them. In addition to that consumers need to be thread/concurrency safe. The host to connect to. Amount of time client will wait for before re-trying to recover connection. Amount of time protocol handshake operations are allowed to take before timing out. Amount of time protocol operations (e.g. queue.declare) are allowed to take before timing out. Factory function for creating the used to generate a list of endpoints for the ConnectionFactory to try in order. The default value creates an instance of the using the list of endpoints passed in. The DefaultEndpointResolver shuffles the provided list each time it is requested. The port to connect on. indicates the default for the protocol should be used. Timeout setting for connection attempts. Timeout setting for socket read operations. Timeout setting for socket write operations. TLS options setting. Set to false to make automatic connection recovery not recover topology (exchanges, queues, bindings, etc). Defaults to true. Construct a fresh instance, with all fields set to their respective defaults. Connection endpoint. Dictionary of client properties to be sent to the server. Password to use when authenticating to the server. Maximum channel number to ask for. Frame-max parameter to ask for (in bytes). Heartbeat timeout to use when negotiating with the server. When set to true, background thread will be used for the I/O loop. Username to use when authenticating to the server. Virtual host to access during this connection. The uri to use for the connection. Default client provided name to be used for connections. Given a list of mechanism names supported by the server, select a preferred mechanism, or null if we have none in common. Create a connection to one of the endpoints provided by the IEndpointResolver returned by the EndpointResolverFactory. By default the configured hostname and port are used. When the configured hostname was not reachable. Create a connection to one of the endpoints provided by the IEndpointResolver returned by the EndpointResolverFactory. By default the configured hostname and port are used. Application-specific connection name, will be displayed in the management UI if RabbitMQ server supports it. This value doesn't have to be unique and cannot be used as a connection identifier, e.g. in HTTP API requests. This value is supposed to be human-readable. When the configured hostname was not reachable. Create a connection using a list of hostnames using the configured port. By default each hostname is tried in a random order until a successful connection is found or the list is exhausted using the DefaultEndpointResolver. The selection behaviour can be overridden by configuring the EndpointResolverFactory. List of hostnames to use for the initial connection and recovery. Open connection When no hostname was reachable. Create a connection using a list of hostnames using the configured port. By default each endpoint is tried in a random order until a successful connection is found or the list is exhausted. The selection behaviour can be overridden by configuring the EndpointResolverFactory. List of hostnames to use for the initial connection and recovery. Application-specific connection name, will be displayed in the management UI if RabbitMQ server supports it. This value doesn't have to be unique and cannot be used as a connection identifier, e.g. in HTTP API requests. This value is supposed to be human-readable. Open connection When no hostname was reachable. Create a connection using a list of endpoints. By default each endpoint will be tried in a random order until a successful connection is found or the list is exhausted. The selection behaviour can be overridden by configuring the EndpointResolverFactory. List of endpoints to use for the initial connection and recovery. Open connection When no hostname was reachable. Create a connection using a list of endpoints. By default each endpoint will be tried in a random order until a successful connection is found or the list is exhausted. The selection behaviour can be overridden by configuring the EndpointResolverFactory. List of endpoints to use for the initial connection and recovery. Application-specific connection name, will be displayed in the management UI if RabbitMQ server supports it. This value doesn't have to be unique and cannot be used as a connection identifier, e.g. in HTTP API requests. This value is supposed to be human-readable. Open connection When no hostname was reachable. Create a connection using an IEndpointResolver. The endpointResolver that returns the endpoints to use for the connection attempt. Application-specific connection name, will be displayed in the management UI if RabbitMQ server supports it. This value doesn't have to be unique and cannot be used as a connection identifier, e.g. in HTTP API requests. This value is supposed to be human-readable. Open connection When no hostname was reachable. Unescape a string, protecting '+'. Set custom socket options by providing a SocketFactory. Creates a new instance of the . Specifies the addressing scheme. New instance of a . Useful default/base implementation of . Subclass and override in application code. Note that the "Handle*" methods run in the connection's thread! Consider using , which exposes events that can be subscribed to consumer messages. Creates a new instance of an . Constructor which sets the Model property to the given value. Common AMQP model. Retrieve the consumer tags this consumer is registered as; to be used to identify this consumer, for example, when cancelling it with . This value is an array because a single consumer instance can be reused to consume on multiple channels. Returns true while the consumer is registered and expecting deliveries from the broker. If our shuts down, this property will contain a description of the reason for the shutdown. Otherwise it will contain null. See . Signalled when the consumer gets cancelled. Retrieve the this consumer is associated with, for use in acknowledging received messages, for instance. Called when the consumer is cancelled for reasons other than by a basicCancel: e.g. the queue has been deleted (either by this channel or by any other channel). See for notification of consumer cancellation due to basicCancel Consumer tag this consumer is registered. Called upon successful deregistration of the consumer from the broker. Consumer tag this consumer is registered. Called upon successful registration of the consumer with the broker. Consumer tag this consumer is registered. Called each time a message is delivered for this consumer. This is a no-op implementation. It will not acknowledge deliveries via if consuming in automatic acknowledgement mode. Subclasses must copy or fully use delivery body before returning. Accessing the body at a later point is unsafe as its memory can be already released. Called when the model (channel) this consumer was registered on terminates. A channel this consumer was registered on. Shutdown context. Default implementation - overridable in subclasses. The set of consumer tags that where cancelled This default implementation simply sets the property to false, and takes no further action. Convenience class providing compile-time names for standard exchange types. Use the static members of this class as values for the "exchangeType" arguments for IModel methods such as ExchangeDeclare. The broker may be extended with additional exchange types that do not appear in this class. Exchange type used for AMQP direct exchanges. Exchange type used for AMQP fanout exchanges. Exchange type used for AMQP headers exchanges. Exchange type used for AMQP topic exchanges. Retrieve a collection containing all standard exchange types. Handle one round of challenge-response. The name of the authentication mechanism, as negotiated on the wire. Return a new authentication mechanism implementation. Convenience class providing compile-time names for standard headers. Use the static members of this class as headers for the arguments for Queue and Exchange declaration or Consumer creation. The broker may be extended with additional headers that do not appear in this class. x-max-priority header x-max-length header x-max-length-bytes header x-dead-letter-exchange header x-dead-letter-routing-key header x-message-ttl header x-expires header alternate-exchange header x-priority header x-queue-mode header. Available modes: "default" and "lazy" x-queue-type header. Available types: "quorum" and "classic"(default) x-quorum-initial-group-size header. Use to control the number of quorum queue members x-single-active-consumer header. Available modes: true and false(default). Allows to have only one consumer at a time consuming from a queue and to fail over to another registered consumer in case the active one is cancelled or dies x-overflow header. Available strategies: "reject-publish" and "drop-head"(default). Allows to configure strategy when or hits limits Retrieve the this consumer is associated with, for use in acknowledging received messages, for instance. Signalled when the consumer gets cancelled. Called when the consumer is cancelled for reasons other than by a basicCancel: e.g. the queue has been deleted (either by this channel or by any other channel). See for notification of consumer cancellation due to basicCancel Consumer tag this consumer is registered. Called upon successful deregistration of the consumer from the broker. Consumer tag this consumer is registered. Called upon successful registration of the consumer with the broker. Consumer tag this consumer is registered. Called each time a message arrives for this consumer. Does nothing with the passed in information. Note that in particular, some delivered messages may require acknowledgement via . The implementation of this method in this class does NOT acknowledge such messages. Called when the model shuts down. Common AMQP model. Information about the reason why a particular model, session, or connection was destroyed. Defines a connection factory capable of using an asynchronous consumer dispatcher which is compatible with . Gets or sets a value indicating whether an asynchronous consumer dispatcher which is compatible with is used. if an asynchronous consumer dispatcher which is compatible with is used; otherwise, . A pluggable authentication mechanism. Handle one round of challenge-response. The name of the authentication mechanism, as negotiated on the wire. Return a new authentication mechanism implementation. Interface to an auto-recovering AMQP connection. Consumer interface. Used to receive messages from a queue by subscription. See IModel.BasicConsume, IModel.BasicCancel. Note that the "Handle*" methods run in the connection's thread! Consider using , which uses a SharedQueue instance to safely pass received messages across to user threads. Retrieve the this consumer is associated with, for use in acknowledging received messages, for instance. Signalled when the consumer gets cancelled. Called when the consumer is cancelled for reasons other than by a basicCancel: e.g. the queue has been deleted (either by this channel or by any other channel). See for notification of consumer cancellation due to basicCancel Consumer tag this consumer is registered. Called upon successful deregistration of the consumer from the broker. Consumer tag this consumer is registered. Called upon successful registration of the consumer with the broker. Consumer tag this consumer is registered. Called each time a message arrives for this consumer. Does nothing with the passed in information. Note that in particular, some delivered messages may require acknowledgement via . The implementation of this method in this class does NOT acknowledge such messages. Called when the model shuts down. Common AMQP model. Information about the reason why a particular model, session, or connection was destroyed. Common AMQP Basic content-class headers interface, spanning the union of the functionality offered by versions 0-8, 0-8qpid, 0-9 and 0-9-1 of AMQP. The specification code generator provides protocol-version-specific implementations of this interface. To obtain an implementation of this interface in a protocol-version-neutral way, use . Each property is readable, writable and clearable: a cleared property will not be transmitted over the wire. Properties on a fresh instance are clear by default. Application Id. Intra-cluster routing identifier (cluster id is deprecated in AMQP 0-9-1). MIME content encoding. MIME content type. Application correlation identifier. Non-persistent (1) or persistent (2). Message expiration specification. Message header field table. Is of type . Application message Id. Sets to either persistent (2) or non-persistent (1). Message priority, 0 to 9. Destination to reply to. Convenience property; parses property using , and serializes it using . Returns null if property cannot be parsed by . Message timestamp. Message type name. User Id. Clear the property. Clear the property (cluster id is deprecated in AMQP 0-9-1). Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Clear the Type property. Clear the property. Returns true if the property is present. Returns true if the property is present (cluster id is deprecated in AMQP 0-9-1). Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the Type property is present. Returns true if the UserId property is present. Main interface to an AMQP connection. Instances of are used to create fresh sessions/channels. The class is used to construct instances. Please see the documentation for ConnectionFactory for an example of usage. Alternatively, an API tutorial can be found in the User Guide. Extends the interface, so that the "using" statement can be used to scope the lifetime of a channel when appropriate. The maximum channel number this connection supports (0 if unlimited). Usable channel numbers range from 1 to this number, inclusive. A copy of the client properties that has been sent to the server. Returns null if the connection is still in a state where it can be used, or the cause of its closure otherwise. Applications should use the ConnectionShutdown event to avoid race conditions. The scenario to avoid is checking , seeing it is null (meaning the was available for use at the time of the check), and interpreting this mistakenly as a guarantee that the will remain usable for a time. Instead, the operation of interest should simply be attempted: if the is not in a usable state, an exception will be thrown (most likely , but may vary depending on the particular operation being attempted). Retrieve the endpoint this connection is connected to. The maximum frame size this connection supports (0 if unlimited). The current heartbeat setting for this connection (System.TimeSpan.Zero for disabled). Returns true if the connection is still in a state where it can be used. Identical to checking if equal null. Returns the known hosts that came back from the broker in the connection.open-ok method at connection startup time. Null until the connection is completely open and ready for use. The this connection is using to communicate with its peer. A dictionary of the server properties sent by the server while establishing the connection. This typically includes the product name and version of the server. Returns the list of objects that contain information about any errors reported while closing the connection in the order they appeared Application-specific connection name, will be displayed in the management UI if RabbitMQ server supports it. This value doesn't have to be unique and cannot be used as a connection identifier, e.g. in HTTP API requests. This value is supposed to be human-readable. Signalled when an exception occurs in a callback invoked by the connection. This event is signalled when a ConnectionShutdown handler throws an exception. If, in future, more events appear on , then this event will be signalled whenever one of those event handlers throws an exception, as well. Raised when the connection is destroyed. If the connection is already destroyed at the time an event handler is added to this event, the event handler will be fired immediately. This method updates the secret used to authenticate this connection. It is used when secrets have an expiration date and need to be renewed, like OAuth 2 tokens. The new secret. The reason for the secret update. Abort this connection and all its channels. Note that all active channels, sessions, and models will be closed if this method is called. In comparison to normal method, will not throw during closing connection. This method waits infinitely for the in-progress close operation to complete. Abort this connection and all its channels. The method behaves in the same way as , with the only difference that the connection is closed with the given connection close code and message. The close code (See under "Reply Codes" in the AMQP 0-9-1 specification) A message indicating the reason for closing the connection Abort this connection and all its channels and wait with a timeout for all the in-progress close operations to complete. This method, behaves in a similar way as method with the only difference that it explictly specifies a timeout given for all the in-progress close operations to complete. If timeout is reached and the close operations haven't finished, then socket is forced to close. To wait infinitely for the close operations to complete use . Abort this connection and all its channels and wait with a timeout for all the in-progress close operations to complete. The method behaves in the same way as , with the only difference that the connection is closed with the given connection close code and message. The close code (See under "Reply Codes" in the AMQP 0-9-1 specification). A message indicating the reason for closing the connection. Close this connection and all its channels. Note that all active channels, sessions, and models will be closed if this method is called. It will wait for the in-progress close operation to complete. This method will not return to the caller until the shutdown is complete. If the connection is already closed (or closing), then this method will do nothing. It can also throw when socket was closed unexpectedly. Close this connection and all its channels. The method behaves in the same way as , with the only difference that the connection is closed with the given connection close code and message. The close code (See under "Reply Codes" in the AMQP specification). A message indicating the reason for closing the connection. Close this connection and all its channels and wait with a timeout for all the in-progress close operations to complete. Note that all active channels, sessions, and models will be closed if this method is called. It will wait for the in-progress close operation to complete with a timeout. If the connection is already closed (or closing), then this method will do nothing. It can also throw when socket was closed unexpectedly. If timeout is reached and the close operations haven't finished, then socket is forced to close. To wait infinitely for the close operations to complete use . Close this connection and all its channels and wait with a timeout for all the in-progress close operations to complete. The method behaves in the same way as , with the only difference that the connection is closed with the given connection close code and message. The close code (See under "Reply Codes" in the AMQP 0-9-1 specification). A message indicating the reason for closing the connection. Operation timeout. Create and return a fresh channel, session, and model. Handle incoming Connection.Blocked methods. Handle incoming Connection.Unblocked methods. Dictionary of client properties to be sent to the server. Password to use when authenticating to the server. Maximum channel number to ask for. Frame-max parameter to ask for (in bytes). Heartbeat setting to request. When set to true, background threads will be used for I/O and heartbeats. Username to use when authenticating to the server. Virtual host to access during this connection. Sets or gets the AMQP Uri to be used for connections. Default client provided name to be used for connections. Given a list of mechanism names supported by the server, select a preferred mechanism, or null if we have none in common. Create a connection to the specified endpoint. Create a connection to the specified endpoint. Application-specific connection name, will be displayed in the management UI if RabbitMQ server supports it. This value doesn't have to be unique and cannot be used as a connection identifier, e.g. in HTTP API requests. This value is supposed to be human-readable. Open connection Connects to the first reachable hostname from the list. List of host names to use Open connection Connects to the first reachable hostname from the list. List of host names to use Application-specific connection name, will be displayed in the management UI if RabbitMQ server supports it. This value doesn't have to be unique and cannot be used as a connection identifier, e.g. in HTTP API requests. This value is supposed to be human-readable. Open connection Create a connection using a list of endpoints. The selection behaviour can be overridden by configuring the EndpointResolverFactory. List of endpoints to use for the initial connection and recovery. Open connection When no hostname was reachable. Create a connection using a list of endpoints. The selection behaviour can be overridden by configuring the EndpointResolverFactory. List of endpoints to use for the initial connection and recovery. Application-specific connection name, will be displayed in the management UI if RabbitMQ server supports it. This value doesn't have to be unique and cannot be used as a connection identifier, e.g. in HTTP API requests. This value is supposed to be human-readable. Open connection When no hostname was reachable. Amount of time protocol handshake operations are allowed to take before timing out. Amount of time protocol operations (e.g. queue.declare) are allowed to take before timing out. A decoded AMQP content header frame. Retrieve the AMQP class ID of this content header. Retrieve the AMQP class name of this content header. Return all AmqpTcpEndpoints in the order they should be tried. A decoded AMQP method frame. AMQP methods can be RPC requests, RPC responses, exceptions (ChannelClose, ConnectionClose), or one-way asynchronous messages. Currently this information is not recorded in their type or interface: it is implicit in the way the method is used, and the way it is defined in the AMQP specification. A future revision of the RabbitMQ .NET client library may extend the IMethod interface to represent this information explicitly. Retrieves the class ID number of this method, as defined in the AMQP specification XML. Retrieves the method ID number of this method, as defined in the AMQP specification XML. Retrieves the name of this method - for debugging use. Common AMQP model, spanning the union of the functionality offered by versions 0-8, 0-8qpid, 0-9 and 0-9-1 of AMQP. Extends the interface, so that the "using" statement can be used to scope the lifetime of a channel when appropriate. Channel number, unique per connections. Returns null if the session is still in a state where it can be used, or the cause of its closure otherwise. 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. Returns true if the model is no longer in a state where it can be used. Returns true if the model is still in a state where it can be used. Identical to checking if equals null. When in confirm mode, return the sequence number of the next message to be published. Signalled when a Basic.Ack command arrives from the broker. Signalled when a Basic.Nack command arrives from the broker. All messages received before this fires that haven't been ack'ed will be redelivered. All messages received afterwards won't be. 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 . Signalled when a Basic.Return command arrives from the broker. 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. Notifies the destruction of the model. If the model is already destroyed at the time an event handler is added to this event, the event handler will be fired immediately. Abort this session. 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 this session. 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 Acknowledge one or more delivered message(s). Delete a Basic content-class consumer. Same as BasicCancel but sets nowait to true and returns void (as there will be no response from the server). Start a Basic content-class consumer. Retrieve an individual message, if one is available; returns null if the server answers that no messages are currently available. See also . Reject one or more delivered message(s). Publishes a message. Routing key must be shorter than 255 bytes. Configures QoS parameters of the Basic content-class. Indicates that a consumer has recovered. Deprecated. Should not be used. Indicates that a consumer has recovered. Deprecated. Should not be used. Reject a delivered message. Close this session. 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 this session. 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 Enable publisher acknowledgements. Creates a BasicPublishBatch instance Construct a completely empty content header for use with the Basic content class. Bind an exchange to an exchange. Routing key must be shorter than 255 bytes. Like ExchangeBind but sets nowait to true. Routing key must be shorter than 255 bytes. Declare an exchange. The exchange is declared non-passive and non-internal. The "nowait" option is not exercised. Same as ExchangeDeclare but sets nowait to true and returns void (as there will be no response from the server). Do a passive exchange declaration. This method performs a "passive declare" on an exchange, which checks whether an exchange exists. It will do nothing if the exchange already exists and result in a channel-level protocol exception (channel closure) if not. Delete an exchange. Like ExchangeDelete but sets nowait to true. Unbind an exchange from an exchange. Routing key must be shorter than 255 bytes. Like ExchangeUnbind but sets nowait to true. Routing key must be shorter than 255 bytes. Bind a queue to an exchange. Routing key must be shorter than 255 bytes. Same as QueueBind but sets nowait parameter to true. Routing key must be shorter than 255 bytes. Declares a queue. See the Queues guide to learn more. The name of the queue. Pass an empty string to make the server generate a name. Should this queue will survive a broker restart? Should this queue use be limited to its declaring connection? Such a queue will be deleted when its declaring connection closes. Should this queue be auto-deleted when its last consumer (if any) unsubscribes? Optional; additional queue arguments, e.g. "x-queue-type" Same as QueueDeclare but sets nowait to true and returns void (as there will be no response from the server). Declare a queue passively. 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. 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. The name of the 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. The name of the queue Delete a queue. Returns the number of messages purged during queue deletion. uint.MaxValue. Same as QueueDelete but sets nowait parameter to true and returns void (as there will be no response from the server) Purge a queue of messages. Returns the number of messages purged. Unbind a queue from an exchange. Routing key must be shorter than 255 bytes. Commit this session's active TX transaction. Roll back this session's active TX transaction. Enable TX mode for this session. Wait until all published messages have been confirmed. 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. Wait until all published messages have been confirmed. True if no nacks were received within the timeout, otherwise false. How long to wait (at most) before returning whether or not any nacks were returned. 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. Wait until all published messages have been confirmed. True if no nacks were received within the timeout, otherwise false. How long to wait (at most) before returning whether or not any nacks were returned. True if the method returned because the timeout elapsed, not because all messages were ack'd or at least one nack'd. 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. Wait until all published messages have been confirmed. 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. Wait until all published messages have been confirmed. 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 OperationInterruptedException exception immediately. Amount of time protocol operations (e.g. queue.declare) are allowed to take before timing out. Start a Basic content-class consumer. Start a Basic content-class consumer. Start a Basic content-class consumer. Start a Basic content-class consumer. (Extension method) Convenience overload of BasicPublish. The publication occurs with mandatory=false and immediate=false. (Extension method) Convenience overload of BasicPublish. The publication occurs with mandatory=false (Spec method) Convenience overload of BasicPublish. (Spec method) Declare a queue. (Extension method) Bind an exchange to an exchange. (Extension method) Like exchange bind but sets nowait to true. (Spec method) Declare an exchange. (Extension method) Like ExchangeDeclare but sets nowait to true. (Spec method) Unbinds an exchange. (Spec method) Deletes an exchange. (Extension method) Like ExchangeDelete but sets nowait to true. (Spec method) Binds a queue. (Spec method) Deletes a queue. (Extension method) Like QueueDelete but sets nowait to true. (Spec method) Unbinds a queue. Common interface for network (TCP/IP) connection classes. Local port. Remote port. Object describing various overarching parameters associated with a particular AMQP protocol variant. Retrieve the protocol's API name, used for printing, configuration properties, IDE integration, Protocols.cs etc. Retrieve the protocol's default TCP port. Retrieve the protocol's major version number. Retrieve the protocol's minor version number. Retrieve the protocol's revision (if specified). A marker interface for entities that are recoverable (currently connection or channel). Common AMQP Stream content-class headers interface, spanning the union of the functionality offered by versions 0-8, 0-8qpid, 0-9 and 0-9-1 of AMQP. The specification code generator provides protocol-version-specific implementations of this interface. To obtain an implementation of this interface in a protocol-version-neutral way, use IModel.CreateStreamProperties(). Each property is readable, writable and clearable: a cleared property will not be transmitted over the wire. Properties on a fresh instance are clear by default. MIME content encoding. MIME content type. Message header field table. Message priority, 0 to 9. Message timestamp. Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Wrapper interface for standard TCP-client. Provides socket for socket frame handler class. Contains all methods that are currenty in use in rabbitmq client. The name of the authentication mechanism, as negotiated on the wire. Return a new authentication mechanism implementation. Provides access to the supported implementations. Protocol version 0-9-1 as modified by Pivotal. Retrieve the current default protocol variant (currently AMQP_0_9_1). Container for an exchange name, exchange type and routing key, usable as the target address of a message to be published. The syntax used for the external representation of instances of this class is compatible with QPid's "Reply-To" field pseudo-URI format. The pseudo-URI format is (exchange-type)://(exchange-name)/(routing-key), where exchange-type is one of the permitted exchange type names (see class ExchangeType), exchange-name must be present but may be empty, and routing-key must be present but may be empty. The syntax is as it is solely for compatibility with QPid's existing usage of the ReplyTo field; the AMQP specifications 0-8 and 0-9 do not define the format of the field, and do not define any format for the triple (exchange name, exchange type, routing key) that could be used instead. Regular expression used to extract the exchange-type, exchange-name and routing-key from a string. Creates a new instance of the . Exchange type. Exchange name. Routing key. Retrieve the exchange name. Retrieve the exchange type string. Retrieve the routing key. Parse a out of the given string, using the regex. Reconstruct the "uri" from its constituents. Represents Queue info. Creates a new instance of the . Queue name. Message count. Consumer count. Consumer count. Message count. Queue name. Information about the reason why a particular model, session, or connection was destroyed. The and properties should be used to determine the originator of the shutdown event. Construct a with the given parameters and 0 for and . Construct a with the given parameters. Object causing the shutdown, or null if none. AMQP content-class ID, or 0 if none. Returns the source of the shutdown event: either the application, the library, or the remote peer. AMQP method ID within a content-class, or 0 if none. One of the standardised AMQP reason codes. See RabbitMQ.Client.Framing.*.Constants. Informative human-readable reason text. Override ToString to be useful for debugging. Describes the source of a shutdown event. The shutdown event originated from the application using the RabbitMQ .NET client library. The shutdown event originated from the RabbitMQ .NET client library itself. Shutdowns with this ShutdownInitiator code may appear if, for example, an internal error is detected by the client, or if the server sends a syntactically invalid frame. Another potential use is on IConnection AutoClose. The shutdown event originated from the remote AMQP peer. A valid received connection.close or channel.close event will manifest as a shutdown with this ShutdownInitiator. Single entry object in the shutdown report that encapsulates description of the error which occured during shutdown. Description provided in the error. object that occured during shutdown, or null if unspecified. Represents a set of configurable TLS options for a connection. Use this class to configure TLS version used, client certificate list or file location, peer certificate verification (validation) functions, expected server name (Subject Alternative Name or Common Name), and so on. Constructs an SslOption specifying both the server cannonical name and the client's certificate path. Constructs an with no parameters set. Retrieve or set the set of TLS policy (peer verification) errors that are deemed acceptable. Retrieve or set the client certificate passphrase. Retrieve or set the path to client certificate. An optional client TLS certificate selection callback. If this is not specified, the first valid certificate found will be used. An optional peer verification (TLS certificate validation) callback. If this is not specified, the default callback will be used in conjunction with the property to determine if the peer's (server's) certificate should be considered valid (acceptable). Retrieve or set the X509CertificateCollection containing the client certificate. If no collection is set, the client will attempt to load one from the specified . Attempts to check certificate revocation status. Default is false. Set to true to check peer certificate for revocation. Uses the built-in .NET TLS implementation machinery for checking a certificate against certificate revocation lists. Controls if TLS should indeed be used. Set to false to disable TLS on the connection. Retrieve or set server's expected name. This MUST match the Subject Alternative Name (SAN) or CN on the peer's (server's) leaf certificate, otherwise the TLS connection will fail. Retrieve or set the TLS protocol version. The client will let the OS pick a suitable version by using . If this option is disabled, e.g.see via app context, the client will attempt to fall back to TLSv1.2. Reconfigures the instance to enable/use TLSv1.2. Only used in environments where System.Security.Authentication.SslProtocols.None is unavailable or effectively disabled, as reported by System.Net.ServicePointManager. Constructor which sets the Model property to the given value. Event fired when a delivery arrives for the consumer. Handlers must copy or fully use delivery body before returning. Accessing the body at a later point is unsafe as its memory can be already released. Fires when the server confirms successful consumer cancelation. Fires on model (channel) shutdown, both client and server initiated. Fires when the server confirms successful consumer cancelation. Fires when the server confirms successful consumer cancelation. Fires when the server confirms successful consumer registration. Fires the Received event. Fires the Shutdown event. Contains all the information about a message acknowledged from an AMQP broker within the Basic content-class. The sequence number of the acknowledged message, or the closed upper bound of acknowledged messages if multiple is true. Whether this acknoledgement applies to one message or multiple messages. Contains all the information about a message delivered from an AMQP broker within the Basic content-class. Default constructor. Constructor that fills the event's properties from its arguments. The content header of the message. The message body. The consumer tag of the consumer that the message was delivered to. The delivery tag for this delivery. See IModel.BasicAck. The exchange the message was originally published to. The AMQP "redelivered" flag. The routing key used when the message was originally published. Contains all the information about a message nack'd from an AMQP broker within the Basic content-class. The sequence number of the nack'd message, or the closed upper bound of nack'd messages if multiple is true. Whether this nack applies to one message or multiple messages. Ignore Clients should ignore this field. Contains all the information about a message returned from an AMQP broker within the Basic content-class. The content header of the message. The message body. The exchange the returned message was originally published to. The AMQP reason code for the return. See RabbitMQ.Client.Framing.*.Constants. Human-readable text from the broker describing the reason for the return. The routing key used when the message was originally published. Wrap an exception thrown by a callback. Access helpful information about the context in which the wrapped exception was thrown. Access the wrapped exception. Describes an exception that was thrown during the library's invocation of an application-supplied callback handler. When an exception is thrown from a callback registered with part of the RabbitMQ .NET client library, it is caught, packaged into a CallbackExceptionEventArgs, and passed through the appropriate IModel's or IConnection's CallbackException event handlers. If an exception is thrown in a CallbackException handler, it is silently swallowed, as CallbackException is the last chance to handle these kinds of exception. Code constructing CallbackExceptionEventArgs instances will usually place helpful information about the context of the call in the IDictionary available through the Detail property. Event relating to connection being blocked. Access the reason why connection is blocked. Event relating to a successful consumer registration or cancellation. Construct an event containing the consumer-tags of the consumer the event relates to. Access the consumer-tags of the consumer the event relates to. Initializes a new instance of the class. The tag before. The tag after. Gets the tag before. Gets the tag after. Experimental class exposing an IBasicConsumer's methods as separate events. Constructor which sets the Model property to the given value. Event fired when a delivery arrives for the consumer. Handlers must copy or fully use delivery body before returning. Accessing the body at a later point is unsafe as its memory can be already released. Fires when the server confirms successful consumer cancelation. Fires on model (channel) shutdown, both client and server initiated. Fires when the server confirms successful consumer cancelation. Fires when the server confirms successful consumer cancelation. Fires when the server confirms successful consumer cancelation. Invoked when a delivery arrives for the consumer. Handlers must copy or fully use delivery body before returning. Accessing the body at a later point is unsafe as its memory can be already released. Fires the Shutdown event. Event relating to flow control. Access the flow control setting. Initializes a new instance of the class. The name before. The name after. Gets the name before. Gets the name after. Describes an exception that was thrown during automatic connection recovery performed by the library. Thrown when the application tries to make use of a session or connection that has already been shut down. Construct an instance containing the given shutdown reason. Thrown when the cause is an authentication failure. Thrown when no connection could be opened during a ConnectionFactory.CreateConnection attempt. Construct a BrokerUnreachableException. The inner exception is an AggregateException holding the errors from multiple connection attempts. Thrown when a SessionManager cannot allocate a new channel number, or the requested channel number is already in use. Indicates that there are no more free channels. Indicates that the specified channel is in use The requested channel number Retrieves the channel number concerned; will return -1 in the case where "no more free channels" is being signaled, or a non-negative integer when "channel is in use" is being signaled. Thrown when the server sends a frame along a channel that we do not currently have a Session entry in our SessionManager for. The channel number concerned. Thrown when a connection to the broker fails Subclass of ProtocolException representing problems requiring a connection.close. Thrown when frame parsing code detects an error in the wire-protocol encoding of a frame. For example, potential MalformedFrameException conditions include frames too short, frames missing their end marker, and invalid protocol negotiation headers. Thrown when a session is destroyed during an RPC call to a broker. For example, if a TCP connection dropping causes the destruction of a session in the middle of a QueueDeclare operation, an OperationInterruptedException will be thrown to the caller of IModel.QueueDeclare. Construct an OperationInterruptedException with the passed-in explanation, if any. Construct an OperationInterruptedException with the passed-in explanation and prefix, if any. Retrieves the explanation for the shutdown. May return null if no explanation is available. Thrown to indicate that the peer didn't understand the packet received from the client. Peer sent default message describing protocol version it is using and transport parameters. The peer's {'A','M','Q','P',txHi,txLo,major,minor} packet is decoded into instances of this class. Fills the new instance's properties with the values passed in. The peer's AMQP specification major version. The peer's AMQP specification minor version. The peer's high transport byte. The peer's low transport byte. Thrown when the likely cause is an authentication failure. Instances of subclasses of subclasses HardProtocolException and SoftProtocolException are thrown in situations when we detect a problem with the connection-, channel- or wire-level parts of the AMQP protocol. Retrieve the reply code to use in a connection/channel close method. Retrieve the shutdown details to use in a connection/channel close method. Defaults to using ShutdownInitiator.Library, and this.ReplyCode and this.Message as the reply code and text, respectively. Thrown to indicate that the peer does not support the wire protocol version we requested immediately after opening the TCP socket. Fills the new instance's properties with the values passed in. The client's AMQP specification major version. The client's AMQP specification minor version. The peer's AMQP specification major version. The peer's AMQP specification minor version. Initializes a new instance of the class. Initializes a new instance of the class with a specified error message. The message that describes the error. Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. Subclass of ProtocolException representing problems requiring a channel.close. Thrown when our peer sends a frame that contains illegal values for one or more fields. Thrown when the connection receives a frame that it wasn't expecting. Thrown when the model receives an RPC reply that it wasn't expecting. The unexpected reply method. Thrown when the protocol handlers detect an unknown class number or method number. The AMQP content-class ID. The AMQP method ID within the content-class, or 0 if none. Thrown when the model receives an RPC request it cannot satisfy. The name of the RPC request that could not be sent. Thrown when the model cannot transmit a method field because the version of the protocol the model is implementing does not contain a definition for the field in question. The name of the unsupported field. The name of the method involved. Thrown when the wire-formatting code cannot encode a particular .NET value to AMQP protocol format. Construct a WireFormattingException with no particular offender (i.e. null) Construct a WireFormattingException with the given offender Object which this exception is complaining about; may be null if no particular offender exists Represents a version of the AMQP specification. Vendor-specific variants of particular official specification versions exist: this class simply represents the AMQP specification version, and does not try to represent information about any custom variations involved. AMQP version 0-8 peers sometimes advertise themselves as version 8-0: for this reason, this class's constructor special-cases 8-0, rewriting it at construction time to be 0-8 instead. Construct an from major and minor version numbers. Converts major=8 and minor=0 into major=0 and minor=8. Please see the class comment. The AMQP specification major version number. The AMQP specification minor version number. Implement value-equality comparison. Implement hashing as for value-equality. Format appropriately for display. The specification currently uses "MAJOR-MINOR" as a display format. API-side invocation of updating the secret. API-side invocation of connection abort. API-side invocation of connection abort. API-side invocation of connection abort with timeout. API-side invocation of connection abort with timeout. API-side invocation of connection.close. API-side invocation of connection.close. API-side invocation of connection.close with timeout. API-side invocation of connection.close with timeout. Transition to auto-recovery state if not already in that state. Attempt to recover connection. If connection is recovered, return to connected state. Underlying connection is open. In the process of recovering underlying connection. This is the main loop for the auto-recovery thread. Cancels the main recovery loop and will block until the loop finishes, or the timeout expires, to prevent Close operations overlapping with recovery operations. Handles commands when in the Recovering state. Handles commands when in the Connected state. Schedule a background Task to signal the command queue when the retry duration has elapsed. Heartbeat frame for transmission. Reusable across connections. Another overload of a Protocol property, useful for exposing a tighter type. Explicit implementation of IConnection.Protocol. Try to close connection in a graceful way Shutdown reason contains code and text assigned when closing the connection, as well as the information about what initiated the close Abort flag, if true, signals to close the ongoing connection immediately and do not report any errors if it was already closed. Timeout determines how much time internal close operations should be given to complete. System.Threading.Timeout.InfiniteTimeSpan value means infinity. Loop only used while quiescing. Use only to cleanly close connection We need to close the socket, otherwise attempting to unload the domain could cause a CannotUnloadAppDomainException Broadcasts notification of the final shutdown of the connection. Sets the channel named in the SoftProtocolException into "quiescing mode", where we issue a channel.close and ignore everything except for subsequent channel.close messages and the channel.close-ok reply that should eventually arrive. Since a well-behaved peer will not wait indefinitely before issuing the close-ok, we don't bother with a timeout here; compare this to the case of a connection.close-ok, where a timeout is necessary. We need to send the close method and politely wait for a reply before marking the channel as available for reuse. As soon as SoftProtocolException is detected, we should stop servicing ordinary application work, and should concentrate on bringing down the channel as quickly and gracefully as possible. The way this is done, as per the close-protocol, is to signal closure up the stack *before* sending the channel.close, by invoking ISession.Close. Once the upper layers have been signalled, we are free to do what we need to do to clean up and shut down the channel. May be called more than once. Should therefore be idempotent. API-side invocation of connection abort. API-side invocation of connection abort. API-side invocation of connection abort with timeout. API-side invocation of connection abort with timeout. API-side invocation of connection.close. API-side invocation of connection.close. API-side invocation of connection.close with timeout. API-side invocation of connection.close with timeout. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Autogenerated type. Private implementation class - do not use directly. Protocol major version (= 0) Protocol minor version (= 9) Protocol revision (= 1) Protocol API name (= :AMQP_0_9_1) Default TCP port (= 5672) Autogenerated type. AMQP specification method "connection.start". Autogenerated type. AMQP specification method "connection.start-ok". Autogenerated type. AMQP specification method "connection.secure". Autogenerated type. AMQP specification method "connection.secure-ok". Autogenerated type. AMQP specification method "connection.tune". Autogenerated type. AMQP specification method "connection.tune-ok". Autogenerated type. AMQP specification method "connection.open". Autogenerated type. AMQP specification method "connection.open-ok". Autogenerated type. AMQP specification method "connection.close". Autogenerated type. AMQP specification method "connection.close-ok". Autogenerated type. AMQP specification method "connection.blocked". Autogenerated type. AMQP specification method "connection.unblocked". Autogenerated type. AMQP specification method "connection.update-secret". Autogenerated type. AMQP specification method "connection.update-secret-ok". Autogenerated type. AMQP specification method "channel.open". Autogenerated type. AMQP specification method "channel.open-ok". Autogenerated type. AMQP specification method "channel.flow". Autogenerated type. AMQP specification method "channel.flow-ok". Autogenerated type. AMQP specification method "channel.close". Autogenerated type. AMQP specification method "channel.close-ok". Autogenerated type. AMQP specification method "exchange.declare". Autogenerated type. AMQP specification method "exchange.declare-ok". Autogenerated type. AMQP specification method "exchange.delete". Autogenerated type. AMQP specification method "exchange.delete-ok". Autogenerated type. AMQP specification method "exchange.bind". Autogenerated type. AMQP specification method "exchange.bind-ok". Autogenerated type. AMQP specification method "exchange.unbind". Autogenerated type. AMQP specification method "exchange.unbind-ok". Autogenerated type. AMQP specification method "queue.declare". Autogenerated type. AMQP specification method "queue.declare-ok". Autogenerated type. AMQP specification method "queue.bind". Autogenerated type. AMQP specification method "queue.bind-ok". Autogenerated type. AMQP specification method "queue.unbind". Autogenerated type. AMQP specification method "queue.unbind-ok". Autogenerated type. AMQP specification method "queue.purge". Autogenerated type. AMQP specification method "queue.purge-ok". Autogenerated type. AMQP specification method "queue.delete". Autogenerated type. AMQP specification method "queue.delete-ok". Autogenerated type. AMQP specification method "basic.qos". Autogenerated type. AMQP specification method "basic.qos-ok". Autogenerated type. AMQP specification method "basic.consume". Autogenerated type. AMQP specification method "basic.consume-ok". Autogenerated type. AMQP specification method "basic.cancel". Autogenerated type. AMQP specification method "basic.cancel-ok". Autogenerated type. AMQP specification method "basic.publish". Autogenerated type. AMQP specification method "basic.return". Autogenerated type. AMQP specification method "basic.deliver". Autogenerated type. AMQP specification method "basic.get". Autogenerated type. AMQP specification method "basic.get-ok". Autogenerated type. AMQP specification method "basic.get-empty". Autogenerated type. AMQP specification method "basic.ack". Autogenerated type. AMQP specification method "basic.reject". Autogenerated type. AMQP specification method "basic.recover-async". Autogenerated type. AMQP specification method "basic.recover". Autogenerated type. AMQP specification method "basic.recover-ok". Autogenerated type. AMQP specification method "basic.nack". Autogenerated type. AMQP specification method "tx.select". Autogenerated type. AMQP specification method "tx.select-ok". Autogenerated type. AMQP specification method "tx.commit". Autogenerated type. AMQP specification method "tx.commit-ok". Autogenerated type. AMQP specification method "tx.rollback". Autogenerated type. AMQP specification method "tx.rollback-ok". Autogenerated type. AMQP specification method "confirm.select". Autogenerated type. AMQP specification method "confirm.select-ok". Autogenerated type. AMQP specification content header properties for content class "basic" Application Id. Intra-cluster routing identifier (cluster id is deprecated in AMQP 0-9-1). MIME content encoding. MIME content type. Application correlation identifier. Non-persistent (1) or persistent (2). Message expiration specification. Message header field table. Is of type . Application message Id. Sets to either persistent (2) or non-persistent (1). Message priority, 0 to 9. Destination to reply to. Convenience property; parses property using , and serializes it using . Returns null if property cannot be parsed by . Message timestamp. Message type name. User Id. Clear the property. Clear the property (cluster id is deprecated in AMQP 0-9-1). Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Clear the property. Clear the Type property. Clear the property. Returns true if the property is present. Returns true if the property is present (cluster id is deprecated in AMQP 0-9-1). Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the property is present. Returns true if the Type property is present. Returns true if the UserId property is present. Retrieve the AMQP class ID of this content header. Retrieve the AMQP class name of this content header. Fill this instance from the given byte buffer stream. A type of . Compiler trick to directly refer to static data in the assembly, see here: https://github.com/dotnet/roslyn/pull/24621 Socket read timeout. System.Threading.Timeout.InfiniteTimeSpan signals "infinity". Socket write timeout. System.Threading.Timeout.InfiniteTimeSpan signals "infinity". Read a frame from the underlying transport. Returns null if the read operation timed out (see Timeout property). Not part of the public API. Extension of IModel to include utilities and connection-setup routines needed by the implementation side. This interface is used by the API autogeneration process. The AMQP XML specifications are read by the spec compilation tool, and after the basic method interface and implementation classes are generated, this interface is scanned, and a spec-version-specific implementation is autogenerated. Annotations are used on certain methods, return types, and parameters, to customise the details of the autogeneration process. Sends a Connection.TuneOk. Used during connection initialisation. Handle incoming Basic.Ack methods. Signals a BasicAckEvent. Handle incoming Basic.CancelOk methods. Handle incoming Basic.ConsumeOk methods. Handle incoming Basic.Deliver methods. Dispatches to waiting consumers. Handle incoming Basic.GetEmpty methods. Routes the information to a waiting Basic.Get continuation. Note that the clusterId field is ignored, as in the specification it notes that it is "deprecated pending review". Handle incoming Basic.GetOk methods. Routes the information to a waiting Basic.Get continuation. Handle incoming Basic.Nack methods. Signals a BasicNackEvent. Handle incoming Basic.RecoverOk methods received in reply to Basic.Recover. Handle incoming Basic.Return methods. Signals a BasicReturnEvent. Handle an incoming Channel.Close. Shuts down the session and model. Handle an incoming Channel.CloseOk. Handle incoming Channel.Flow methods. Either stops or resumes sending the methods that have content. Handle an incoming Connection.Blocked. Handle an incoming Connection.Close. Shuts down the connection and all sessions and models. Handle an incoming Connection.OpenOk. Handle incoming Connection.Secure methods. Handle an incoming Connection.Start. Used during connection initialisation. Handle incoming Connection.Tune methods. Handle an incominga Connection.Unblocked. Handle incoming Queue.DeclareOk methods. Routes the information to a waiting Queue.DeclareOk continuation. Used to send a Basic.Cancel method. The public consume API calls this while also managing internal datastructures. Used to send a Basic.Consume method. The public consume API calls this while also managing internal datastructures. Used to send a Basic.Get. Basic.Get is a special case, since it can result in a Basic.GetOk or a Basic.GetEmpty, so this level of manual control is required. Used to send a Basic.Publish method. Called by the public publish method after potential null-reference issues have been rectified. Used to send a Channel.Close. Called during session shutdown. Used to send a Channel.CloseOk. Called during session shutdown. Used to send a Channel.FlowOk. Confirms that Channel.Flow from the broker was processed. Used to send a Channel.Open. Called during session initialisation. Used to send a Confirm.Select method. The public confirm API calls this while also managing internal datastructures. Used to send a Connection.Close. Called during connection shutdown. Used to send a Connection.CloseOk. Called during connection shutdown. Used to send a Connection.Open. Called during connection startup. Used to send a Connection.SecureOk. Again, this is special, like Basic.Get. Used to send a Connection.StartOk. This is special, like Basic.Get. Used to send a Conection.UpdateSecret method. Called by the public UpdateSecret method. Used to send a Exchange.Bind method. Called by the public bind method. Used to send a Exchange.Declare method. Called by the public declare method. Used to send a Exchange.Delete method. Called by the public delete method. Used to send a Exchange.Unbind method. Called by the public unbind method. Used to send a Queue.Bind method. Called by the public bind method. Used to send a Queue.Declare method. Called by the public declare method. Used to send a Queue.Delete method. Called by the public delete method. Used to send a Queue.Purge method. Called by the public purge method. Essential information from an incoming Connection.Tune method. The peer's suggested channel-max parameter. The peer's suggested frame-max parameter. The peer's suggested heartbeat parameter. Gets the channel number. Gets the close reason. Single recipient - no need for multiple handlers to be informed of arriving commands. Gets the connection. Gets a value indicating whether this session is open. Multicast session shutdown event. Small ISession implementation used only for channel 0. Set channel 0 as quiescing Method should be idempotent. Cannot use base.Close method call because that would prevent us from sending/receiving Close/CloseOk commands Retrieves the class ID number of this method, as defined in the AMQP specification XML. Retrieves the method ID number of this method, as defined in the AMQP specification XML. Retrieves the name of this method - for debugging use. Only used to kick-start a connection open sequence. See Broadcasts notification of the final shutdown of the model. Do not call anywhere other than at the end of OnSessionShutdown. Must not be called when m_closeReason == null, because otherwise there's a window when a new continuation could be being enqueued at the same time as we're broadcasting the shutdown event. See the definition of Enqueue() above. Handle incoming Connection.Tune methods. Small ISession implementation used during channel quiescing. Manages a queue of waiting AMQP RPC requests. Currently, pipelining of requests is forbidden by this implementation. The AMQP 0-8 and 0-9 specifications themselves forbid pipelining, but only by the skin of their teeth and under a somewhat generous reading. Enqueue a continuation, marking a pending RPC. Continuations are retrieved in FIFO order by calling Next(). In the current implementation, only one continuation can be queued up at once. Calls to Enqueue() when a continuation is already enqueued will result in NotSupportedException being thrown. Interrupt all waiting continuations. There's just the one potential waiter in the current implementation. Retrieve the next waiting continuation. It is an error to call this method when there are no waiting continuations. In the current implementation, if this happens, null will be returned (which will usually result in an immediate NullPointerException in the caller). Correct code will always arrange for a continuation to have been Enqueue()d before calling this method. Normal ISession implementation used during normal channel operation. Called from CheckAutoClose, in a separate thread, when we decide to close the connection. If m_autoClose and there are no active sessions remaining, Close()s the connection with reason code 200. Replace an active session slot with a new ISession implementation. Used during channel quiescing. Make sure you pass in a channelNumber that's currently in use, as if the slot is unused, you'll get a null pointer exception. Represents an which does the actual heavy lifting to set up an SSL connection, using the config options in an to make things cleaner. Upgrade a Tcp stream to an Ssl stream using the TLS options provided. Simple wrapper around TcpClient. Reads an AMQP "table" definition from the reader. Supports the AMQP 0-8/0-9 standard entry types S, I, D, T and F, as well as the QPid-0-8 specific b, d, f, l, s, t, x and V types and the AMQP 0-9-1 A type. A . Base class for attributes for controlling the API autogeneration process. The specification namespace (i.e. version) that this attribute applies to, or null for all specification versions. Causes the API generator to ignore the attributed method. Mostly used to declare convenience overloads of various AMQP methods in the IModel interface. Also used to omit an autogenerated implementation of a method which is not required for one protocol version. The API autogeneration process should of course not attempt to produce an implementation of the convenience methods, as they will be implemented by hand with sensible defaults, delegating to the autogenerated variant of the method concerned. Causes the API generator to generate asynchronous receive code for the attributed method. Causes the API generator to generate exception-throwing code for, instead of simply ignoring, the attributed method. Informs the API generator which AMQP method field to use for either a parameter in a request, or for a simple result in a reply. Informs the API generator which AMQP method to use for either a request (if applied to an IModel method) or a reply (if applied to an IModel method result). This attribute, if placed on a parameter in an IModel method, causes it to be interpreted as a "nowait" parameter for the purposes of autogenerated RPC reply continuation management and control. This attribute, if placed on a method in IModel, causes the method to be interpreted as a factory method producing a protocol-specific implementation of a common content header interface. This attribute, if placed on a parameter in a content-carrying IModel method, causes it to be sent as part of the content header frame. This attribute, if placed on a parameter in a content-carrying IModel method, causes it to be sent as part of the content body frame. This attribute, placed on an IModel method, causes what would normally be an RPC, sent with ModelRpc, to be sent as if it were oneway, with ModelSend. The assumption that this is for a custom continuation (e.g. for BasicConsume/BasicCancel etc.) (= 1) (= 2) (= 3) (= 8) (= 4096) (= 206) (= 200) (= 311) (= 313) (= 320) (= 402) (= 403) (= 404) (= 405) (= 406) (= 501) (= 502) (= 503) (= 504) (= 505) (= 506) (= 530) (= 540) (= 541) A thread-safe single-assignment reference cell. A fresh BlockingCell holds no value (is empty). Any thread reading the Value property when the cell is empty will block until a value is made available by some other thread. The Value property can only be set once - on the first call, the BlockingCell is considered full, and made immutable. Further attempts to set Value result in a thrown InvalidOperationException. Retrieve the cell's value, waiting for the given timeout if no value is immediately available. If a value is present in the cell at the time the call is made, the call will return immediately. Otherwise, the calling thread blocks until either a value appears, or operation times out. If no value was available before the timeout, an exception is thrown. Retrieve the cell's value, blocking if none exists at present, or supply a value to an empty cell, thereby filling it. Miscellaneous debugging and development utilities. Not part of the public API. Print a hex dump of the supplied bytes to stdout. Print a hex dump of the supplied bytes to the supplied TextWriter. Prints an indented key/value pair; used by DumpProperties() Recurses into the value using DumpProperties(). Dump properties of objects to the supplied writer. Used internally by class Either. Models the disjoint union of two alternatives, a "left" alternative and a "right" alternative. Borrowed from ML, Haskell etc. Private constructor. Use the static methods Left, Right instead. Retrieve the alternative represented by this instance. Retrieve the value carried by this instance. Constructs an Either instance representing a Left alternative. Constructs an Either instance representing a Right alternative. A class for allocating integer IDs in a given range. A class representing a list of inclusive intervals Creates an IntAllocator allocating integer IDs within the inclusive range [start, end] Allocate a fresh integer from the range, or return -1 if no more integers are available. This operation is guaranteed to run in O(1) Make the provided integer available for allocation again. This operation runs in amortized O(sqrt(range size)) time: About every sqrt(range size) operations will take O(range_size + number of intervals) to complete and the rest run in constant time. No error checking is performed, so if you double Free or Free an integer that was not originally Allocated the results are undefined. Sorry. A thread-safe shared queue implementation. A thread-safe shared queue implementation. Flag holding our current status. The shared queue. Subclasses must ensure appropriate locking discipline when accessing this field. See the implementation of Enqueue, Dequeue. Close the queue. Causes all further Enqueue() operations to throw EndOfStreamException, and all pending or subsequent Dequeue() operations to throw an EndOfStreamException once the queue is empty. Retrieve the first item from the queue, or block if none available Callers of Dequeue() will block if no items are available until some other thread calls Enqueue() or the queue is closed. In the latter case this method will throw EndOfStreamException. Retrieve the first item from the queue, or return nothing if no items are available after the given timeout If one or more items are present on the queue at the time the call is made, the call will return immediately. Otherwise, the calling thread blocks until either an item appears on the queue, or millisecondsTimeout milliseconds have elapsed. Returns true in the case that an item was available before the timeout, in which case the out parameter "result" is set to the item itself. If no items were available before the timeout, returns false, and sets "result" to null. A timeout of -1 (i.e. System.Threading.Timeout.InfiniteTimeSpan) will be interpreted as a command to wait for an indefinitely long period of time for an item to become available. Usage of such a timeout is equivalent to calling Dequeue() with no arguments. See also the MSDN documentation for System.Threading.Monitor.Wait(object,int). If no items are present and the queue is in a closed state, or if at any time while waiting the queue transitions to a closed state (by a call to Close()), this method will throw EndOfStreamException. Retrieve the first item from the queue, or return defaultValue immediately if no items are available If one or more objects are present in the queue at the time of the call, the first item is removed from the queue and returned. Otherwise, the defaultValue that was passed in is returned immediately. This defaultValue may be null, or in cases where null is part of the range of the queue, may be some other sentinel object. The difference between DequeueNoWait() and Dequeue() is that DequeueNoWait() will not block when no items are available in the queue, whereas Dequeue() will. If at the time of call the queue is empty and in a closed state (following a call to Close()), then this method will throw EndOfStreamException. Place an item at the end of the queue. If there is a thread waiting for an item to arrive, the waiting thread will be woken, and the newly Enqueued item will be passed to it. If the queue is closed on entry to this method, EndOfStreamException will be thrown. Implementation of the IEnumerable interface, for permitting SharedQueue to be used in foreach loops. Implementation of the IEnumerable interface, for permitting SharedQueue to be used in foreach loops. Call only when the lock on m_queue is held. Implementation of the IEnumerator interface, for permitting SharedQueue to be used in foreach loops. Construct an enumerator for the given SharedQueue. Reset()ting a SharedQueue doesn't make sense, so this method always throws InvalidOperationException.