public OutboundMessageQueue(string qmgr, string qname, string host, int?port, string channel, Func <MQQueueManager> mqQueueManagerFactory = null) { this._qmgr = qmgr; this._qname = qname; this.host = host; this.port = port; this.channel = channel; _connectionProperties = MQConnectionPropertiesHelper.CreateConnectionProperties(channel, host, port); _mqQueueManagerFactory = mqQueueManagerFactory ?? (() => new MQQueueManager(_qmgr, _connectionProperties)); }
/// <param name="qmgr">Name of QueueManager</param> /// <param name="qname">Name of Queue</param> /// <param name="channel">Name of Channel</param> /// <param name="host">Hostname</param> /// <param name="port">Host port</param> /// <param name="concurrentWorkers"></param> /// <param name="useTransactions"></param> /// <param name="autoStart"></param> public InboundMessageQueue( string qmgr, string qname, string channel = null, string host = null, int?port = null, string correlationId = null, int?messageType = null, int concurrentWorkers = 1, bool useTransactions = true, int numBackoutAttempts = 1, bool autoStart = true, IObserver <MQMessage> errorQueue = null, IObserver <Exception> exceptions = null) { _qmgr = qmgr; _useTransactions = useTransactions; _connectionProperties = MQConnectionPropertiesHelper.CreateConnectionProperties(channel, host, port); _underlying = new RawInboundMessageQueue(qmgr, qname, channel, host, port, correlationId, messageType, concurrentWorkers, useTransactions, numBackoutAttempts, autoStart, errorQueue, exceptions, NewMessageOptions, NewMessage, NewQueueManager); }