public CouchbaseMessageBus(IDependencyResolver resolver, CouchbaseScaleoutConfiguration configuration)
            : base(resolver, configuration)
        {
            _config = configuration ?? throw new ArgumentNullException("configuration");
            _trace  = resolver.Resolve <ITraceManager>()["Signalr." + typeof(CouchbaseMessageBus).Name];

            Task.Run(() => ConnectWithRetry());
        }
        public static IDependencyResolver UseCouchbase(this IDependencyResolver resolver, CouchbaseScaleoutConfiguration configuration)
        {
            var bus = new Lazy <CouchbaseMessageBus>(() => new CouchbaseMessageBus(resolver, configuration));

            resolver.Register(typeof(IMessageBus), () => bus.Value);

            return(resolver);
        }