Ejemplo n.º 1
0
 public void PurgeSpool(AmqpChannelAddress addr)
 {
     foreach (AmqpSenderLink sender in links.Where(l => l.Address.ToUpper() == addr.Address.ToUpper()).OfType <AmqpSenderLink>())
     {
         sender.PurgeSpool();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns the total number of messages spooled for a particular
        /// </summary>
        /// <param name="addr"></param>
        /// <returns></returns>
        public int GetSpoolSize(AmqpChannelAddress addr)
        {
            string key = addr.Uri.ToString();

            if (channels.ContainsKey(key))
            {
                return(channels[key].GetSpoolSize(addr.Address));
            }
            else
            {
                throw new ArgumentException("The specified channel does not exist.");
            }
        }
Ejemplo n.º 3
0
 private void Channel_OnCFXMessageReceived(AmqpChannelAddress source, CFXEnvelope message)
 {
     OnCFXMessageReceived?.Invoke(source, message);
 }
Ejemplo n.º 4
0
 public void CloseSubscribeChannel(AmqpChannelAddress address)
 {
     CloseSubscribeChannel(address.Uri, address.Address);
 }
Ejemplo n.º 5
0
 public void AddSubscribeChannel(AmqpChannelAddress address, AuthenticationMode authMode = AuthenticationMode.Auto, X509Certificate certificate = null)
 {
     AddSubscribeChannel(address.Uri, address.Address, authMode, certificate);
 }
Ejemplo n.º 6
0
 public void ClosePublishChannel(AmqpChannelAddress address)
 {
     ClosePublishChannel(address.Uri, address.Address);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Adds a new publish channel for this endpoint.  All messages published by the endpoint will be transmitted to one or more publish channels that
 /// are established using this method.  Only call this methoud after this endpoint has been opened by the Open method.
 /// </summary>
 /// <param name="address">Represents the network address and AMQP target address of the target channel</param>
 /// <param name="authMode">The authentication mode for this channel.</param>
 /// <param name="certificate">If secure amqps is being used, this property may optionally include the certificate that will be matched
 /// against the server's certificate.  Leave null if you do not wish to perform certificate matching (secure communications will still be established
 /// using the server's certificate (if using amqps).</param>
 /// <param name="targetHostName">If using a broker with multiple virtual hosts, the virtual host name to be used on the broker.</param>
 public void AddPublishChannel(AmqpChannelAddress address, AuthenticationMode authMode = AuthenticationMode.Auto, X509Certificate certificate = null, string targetHostName = null)
 {
     AddPublishChannel(address.Uri, address.Address, authMode, certificate, targetHostName);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Adds a new subscription channel for this endpoint.
 /// </summary>
 /// <param name="address">The address (network address + AMQP source address) of the source.</param>
 /// <param name="certificate">If secure amqps is being used, this property may optionally include the certificate that will be matched
 /// against the server's certificate.  Leave null if you do not wish to perform certificate matching (secure communications will still be established
 /// using the server's certificate (if using amqps).</param>
 /// <param name="virtualHostName">If using a broker with multiple virtual hosts, the virtual host name to be used on the broker.</param>
 public void AddSubscribeChannel(AmqpChannelAddress address, string virtualHostName = null, X509Certificate certificate = null)
 {
     AddSubscribeChannel(address.Uri, address.Address, virtualHostName, certificate);
 }
Ejemplo n.º 9
0
 public void AddSubscribeChannel(AmqpChannelAddress address, AuthenticationMode authMode = AuthenticationMode.Auto)
 {
     AddSubscribeChannel(address.Uri, address.Address);
 }