private static void processOptions(IConnectionInfo connectionInfo)
        {
            string brokerlist = connectionInfo.GetOption(ConnectionUrlConstants.OPTIONS_BROKERLIST);

            if (brokerlist != null)
            {
                //brokerlist tcp://host:port?option='value',option='value';vm://:3/virtualpath?option='value'
                Regex splitter = new Regex("" + URLHelper.BROKER_SEPARATOR);

                foreach (string broker in splitter.Split(brokerlist))
                {
                    connectionInfo.AddBrokerInfo(new AmqBrokerInfo(broker));
                }

                connectionInfo.SetOption(ConnectionUrlConstants.OPTIONS_BROKERLIST, null);
                //                _options.remove(OPTIONS_BROKERLIST);
            }

            string failover = connectionInfo.GetOption(ConnectionUrlConstants.OPTIONS_FAILOVER);

            if (failover != null)
            {
                // failover='method?option='value',option='value''

                int methodIndex = failover.IndexOf('?');

                if (methodIndex > -1)
                {
                    connectionInfo.FailoverMethod = failover.Substring(0, methodIndex);
                    QpidConnectionInfo qpidConnectionInfo = (QpidConnectionInfo)connectionInfo;
                    URLHelper.parseOptions(qpidConnectionInfo.GetFailoverOptions(),
                                           failover.Substring(methodIndex + 1));
                }
                else
                {
                    connectionInfo.FailoverMethod = failover;
                }

                connectionInfo.SetOption(ConnectionUrlConstants.OPTIONS_FAILOVER, null);
                //                _options.remove(OPTIONS_FAILOVER);
            }
        }
        public void SetBroker(IBrokerInfo broker)
        {
            _connectionDetails.AddBrokerInfo(broker);

            int index = _connectionDetails.GetAllBrokerInfos().IndexOf(broker);

            String serverRetries = broker.GetOption(BrokerInfoConstants.OPTIONS_RETRY);

            if (serverRetries != null)
            {
                try
                {
                    _serverRetries = int.Parse(serverRetries);
                }
                catch (FormatException)
                {
                    _serverRetries = DEFAULT_SERVER_RETRIES;
                }
            }

            _currentServerRetry = -1;
            _currentBrokerIndex = index;
        }