public EventBusSubscription <T> Subscribe <T>() where T : IntegrationEvent
        {
            lock (subscriptions)
            {
                if (!subscriptions.TryGetValue(typeof(T), out var list))
                {
                    list = new List <EventBusSubscription>();
                    subscriptions.Add(typeof(T), list);
                }

                var channel      = Channel.CreateUnbounded <T>();
                var subscription = new EventBusSubscription <T>(channel);
                subscription2Channel.Add(subscription, channel);

                list.Add(subscription);
                logger.LogInformation($"Added subscription to {typeof(T).Name}");
                return(subscription);
            }
        }
        public bool TryUnsubscribe <T>(EventBusSubscription <T> subscription) where T : IntegrationEvent
        {
            if (subscription == null)
            {
                return(false);
            }
            lock (subscriptions)
            {
                if (!subscriptions.TryGetValue(typeof(T), out var list))
                {
                    return(false);
                }

                var result = list.Remove(subscription);
                subscription2Channel.Remove(subscription);
                if (result)
                {
                    logger.LogInformation($"Removed subscription to {typeof(T).Name}");
                }
                return(result);
            }
        }