Example #1
0
 [AutomaticRetry(Attempts = 3, OnAttemptsExceeded = AttemptsExceededAction.Fail)] //重试次数,重试结果处理
 public void PublishData()
 {
     if (EventData != null)
     {
         _remoteEventBus.Publish("Topic_Test", EventData);
     }
 }
Example #2
0
        public string Get()
        {
            var EventData = new RemoteEventData("Type_Test")
            {
                Data = { ["playload"] = DateTime.Now }
            };

            //发布事件
            _remoteEventBus.Publish("Topic_Test", eventData: EventData);
            return("OK");
        }