This is an automated email from the ASF dual-hosted git repository. aaronai pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git
commit bec161454bf896c394bcd634c6a8a103025214ea Author: Aaron Ai <[email protected]> AuthorDate: Tue Feb 28 14:12:37 2023 +0800 Fetch topic firstly before add scheduled task --- csharp/rocketmq-client-csharp/Client.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/csharp/rocketmq-client-csharp/Client.cs b/csharp/rocketmq-client-csharp/Client.cs index 89452600..1b3ff59d 100644 --- a/csharp/rocketmq-client-csharp/Client.cs +++ b/csharp/rocketmq-client-csharp/Client.cs @@ -86,17 +86,18 @@ namespace Org.Apache.Rocketmq protected virtual async Task Start() { Logger.Debug($"Begin to start the rocketmq client, clientId={ClientId}"); - ScheduleWithFixedDelay(UpdateTopicRouteCache, TopicRouteUpdateScheduleDelay, TopicRouteUpdateSchedulePeriod, - _topicRouteUpdateCts.Token); - ScheduleWithFixedDelay(Heartbeat, HeartbeatScheduleDelay, HeartbeatSchedulePeriod, _heartbeatCts.Token); - ScheduleWithFixedDelay(SyncSettings, SettingsSyncScheduleDelay, SettingsSyncSchedulePeriod, - _settingsSyncCts.Token); - ScheduleWithFixedDelay(Stats, StatsScheduleDelay, StatsSchedulePeriod, _statsCts.Token); foreach (var topic in GetTopics()) { await FetchTopicRoute(topic); } + ScheduleWithFixedDelay(UpdateTopicRouteCache, TopicRouteUpdateScheduleDelay, + TopicRouteUpdateSchedulePeriod, + _topicRouteUpdateCts.Token); + ScheduleWithFixedDelay(Heartbeat, HeartbeatScheduleDelay, HeartbeatSchedulePeriod, _heartbeatCts.Token); + ScheduleWithFixedDelay(SyncSettings, SettingsSyncScheduleDelay, SettingsSyncSchedulePeriod, + _settingsSyncCts.Token); + ScheduleWithFixedDelay(Stats, StatsScheduleDelay, StatsSchedulePeriod, _statsCts.Token); Logger.Debug($"Start the rocketmq client successfully, clientId={ClientId}"); }
