Class PublicationAddress
Container for an exchange name, exchange type and routing key, usable as the target address of a message to be published.
Inherited Members
Namespace: RabbitMQ.Client
Assembly: Apigen.dll
Syntax
public class PublicationAddress
Remarks
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.
Constructors
| Edit this page View SourcePublicationAddress(string, string, string)
Creates a new instance of the PublicationAddress.
Declaration
public PublicationAddress(string exchangeType, string exchangeName, string routingKey)
Parameters
Type | Name | Description |
---|---|---|
string | exchangeType | Exchange type. |
string | exchangeName | Exchange name. |
string | routingKey | Routing key. |
Fields
| Edit this page View SourcePSEUDO_URI_PARSER
Regular expression used to extract the exchange-type, exchange-name and routing-key from a string.
Declaration
public static readonly Regex PSEUDO_URI_PARSER
Field Value
Type | Description |
---|---|
Regex |
Properties
| Edit this page View SourceExchangeName
Retrieve the exchange name.
Declaration
public string ExchangeName { get; }
Property Value
Type | Description |
---|---|
string |
ExchangeType
Retrieve the exchange type string.
Declaration
public string ExchangeType { get; }
Property Value
Type | Description |
---|---|
string |
RoutingKey
Retrieve the routing key.
Declaration
public string RoutingKey { get; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceParse(string)
Parse a PublicationAddress out of the given string, using the PSEUDO_URI_PARSER regex.
Declaration
public static PublicationAddress Parse(string uriLikeString)
Parameters
Type | Name | Description |
---|---|---|
string | uriLikeString |
Returns
Type | Description |
---|---|
PublicationAddress |
ToString()
Reconstruct the "uri" from its constituents.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceTryParse(string, out PublicationAddress)
Declaration
public static bool TryParse(string uriLikeString, out PublicationAddress result)
Parameters
Type | Name | Description |
---|---|---|
string | uriLikeString | |
PublicationAddress | result |
Returns
Type | Description |
---|---|
bool |