Exemplo n.º 1
0
        public void Dispose()
        {
            if (!_disposed)
            {
                foreach (var topic in _topics.Keys)
                {
                    _client.DeleteTopic(topic);
                }

                _eventbus = null;
                _disposed = true;
            }
        }
Exemplo n.º 2
0
 public AliyunMNSPublisher(IRemoteEventBus eventBus)
 {
     _eventbus = (AliyunMNSEventBus)eventBus;
     try
     {
         _client = new MNSClient(_eventbus.AccessKeyId, _eventbus.AccessKeySecret, _eventbus.Endpoint);
     }
     catch (Exception ex)
     {
         XTrace.WriteLine($"创建阿里云消息发送器失败,请检查配置文件或阿里云配置是否正确。");
         XTrace.WriteException(ex);
         throw ex;
     }
 }
Exemplo n.º 3
0
 public AliyunMNSSubscriber(IRemoteEventBus eventBus)
 {
     eventbus = (AliyunMNSEventBus)eventBus;
 }