/// <summary>
        /// Initialises an instance of the <see cref="AmqpBuilder"/> class.
        /// </summary>
        /// <param name="logFactory"></param>
        /// <param name="endpointAddress"></param>
        public AmqpBuilder(ILogFactory logFactory, QueueEndpointAddress endpointAddress) : this(logFactory)
        {
            endpointAddress.ShouldNotBeNull();

            m_Connection = BuildConnection(endpointAddress);
            m_EndpointAddress = endpointAddress;
        }
        /// <summary>
        /// Initialises an instance of the <see cref="AmqpBuilder"/> class.
        /// </summary>
        /// <param name="logFactory"></param>
        /// <param name="endpointAddress"></param>
        /// <param name="closedEventHandler"></param>
        public AmqpBuilder(ILogFactory logFactory, QueueEndpointAddress endpointAddress, EventHandler closedEventHandler) : this(logFactory)
        {
            endpointAddress.ShouldNotBeNull();

            m_Connection = BuildConnection(endpointAddress, closedEventHandler);
            m_EndpointAddress = endpointAddress;
        }
        /// <summary>
        /// Initialises an instance of the publisher.
        /// </summary>
        /// <param name="logger"></param>
        /// <param name="connection">
        /// The AMQP connection to use.
        /// </param>
        /// <param name="topicName">
        /// The topic name to publish to.
        /// </param>
        /// <param name="name">
        /// The unique name to associate with the link used to send messages on.
        /// </param>
        /// <param name="isDurable">
        /// Indicates whether the messages should be durable (Persistent).
        /// </param>
        public AmqpMessagePublisher(ILogger logger, AmqpConnection connection, string topicName, string name, bool isDurable = true)
        {
            connection.ShouldNotBeNull();
            topicName.ShouldNotBeEmpty();
            name.ShouldNotBeEmpty();
            logger.ShouldNotBeNull();

            m_Logger = logger;
            m_ConnectionId = string.Empty;
            m_Connection = connection;
            m_TopicName = topicName;
            m_Name = name;
            m_IsDurable = isDurable;
            m_SendTimeoutInMilliseconds = 10000;
        }
        /// <summary>
        /// Initialises an instance of the publisher.
        /// </summary>
        /// <param name="connection">
        /// The AMQP connection to use.
        /// </param>
        /// <param name="topicName">
        /// The topic name to publish to.
        /// </param>
        /// <param name="name">
        /// The unique name to associate with the link used to receive messages on.
        /// </param>
        /// <param name="handler">
        /// Processes incoming messages from the AMQP server.
        /// </param>
        public AmqpMessageSubscriber(ILogger logger, AmqpConnection connection, string topicName, string name, IMessageHandler handler, int windowSize = 20)
        {
            connection.ShouldNotBeNull();
            topicName.ShouldNotBeEmpty();
            handler.ShouldNotBeNull();
            name.ShouldNotBeEmpty();
            logger.ShouldNotBeNull();

            m_Logger = logger;
            m_Connection = connection;
            m_ConnectionId = string.Empty;
            m_TopicName = topicName;
            m_MessageHandler = handler;
            m_WindowSize = windowSize;
            m_Name = name;
        }