Example #1
0
        /// <summary>
        /// Construcotr
        /// </summary>
        /// <param name="factory">Messaging factory instance</param>
        /// <param name="path">Entity path</param>
        /// <param name="receiveMode">Receive mode</param>
        internal AmqpMessageReceiver(AmqpMessagingFactory factory, string path, ReceiveMode receiveMode)
            : base(factory, path)
        {
            this.factory = factory;
            this.receiveMode = receiveMode;

            this.peekedMessages = new Hashtable();
        }
Example #2
0
        /// <summary>
        /// Create a messaging factory based on a address and related settings
        /// </summary>
        /// <param name="address">Base address</param>
        /// <param name="settings">Messaging factory settings</param>
        /// <returns>Messaging factory</returns>
        public static MessagingFactory Create(Uri address, MessagingFactorySettings settings)
        {
            MessagingFactory factory;

            settings.TransportType = TransportType.Amqp;

            if (settings.AmqpTransportSettings == null)
            {
                settings.AmqpTransportSettings = new AmqpTransportSettings();
                settings.AmqpTransportSettings.Port = AmqpTransportSettings.AMQPS_PORT;
                settings.AmqpTransportSettings.TokenProvider = settings.TokenProvider;
            }

            factory = new AmqpMessagingFactory(address, settings.AmqpTransportSettings);
            factory.settings = settings;

            return factory;
        }
Example #3
0
 /// <summary>
 /// Construcotr
 /// </summary>
 /// <param name="factory">Messaging factory instance</param>
 /// <param name="path">Entity path</param>
 internal AmqpMessageReceiver(AmqpMessagingFactory factory, string path)
     : this(factory, path, ReceiveMode.PeekLock)
 {
 }