Class PublicationAddress
Container for an exchange name, exchange type and routing key, usable as the target address of a message to be published.
public class PublicationAddress
- Inheritance
-
PublicationAddress
- Inherited Members
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
PublicationAddress(string, string, string)
Creates a new instance of the PublicationAddress.
public PublicationAddress(string exchangeType, string exchangeName, string routingKey)
Parameters
exchangeType
stringExchange type.
exchangeName
stringExchange name.
routingKey
stringRouting key.
Fields
PSEUDO_URI_PARSER
Regular expression used to extract the exchange-type, exchange-name and routing-key from a string.
public static readonly Regex PSEUDO_URI_PARSER
Field Value
Properties
ExchangeName
Retrieve the exchange name.
public string ExchangeName { get; }
Property Value
ExchangeType
Retrieve the exchange type string.
public string ExchangeType { get; }
Property Value
RoutingKey
Retrieve the routing key.
public string RoutingKey { get; }
Property Value
Methods
Parse(string)
Parse a PublicationAddress out of the given string, using the PSEUDO_URI_PARSER regex.
public static PublicationAddress Parse(string uriLikeString)
Parameters
uriLikeString
string
Returns
ToString()
Reconstruct the "uri" from its constituents.
public override string ToString()
Returns
TryParse(string, out PublicationAddress)
public static bool TryParse(string uriLikeString, out PublicationAddress result)
Parameters
uriLikeString
stringresult
PublicationAddress