refactor: save current workspace state including FinlyticAnalyzer fixes, FinlyticApp trade route alignment, and DTO audit documentation

This commit is contained in:
2026-08-12 18:30:42 +02:00
parent a9553e9fbf
commit 3d8af3940b
163 changed files with 3421 additions and 1751 deletions
@@ -61,6 +61,7 @@ public class FundamentalsMqttClient : ManagedMqttClient, IHostedService
_logger.LogInformation("[{Channel}] Fundamentals MQTT client connected. Subscribing to RPC request topics...", "FundamentalsChannel");
await SubscribeAsync("services/request/fundamentals_Get/#");
await SubscribeAsync("services/request/events_GetAll/#");
await SubscribeAsync("services/request/events_GetByMonth/#");
await SubscribeAsync("services/request/health_Ping/#");
await SubscribeAsync("services/config/updated/#");
}
@@ -87,15 +88,19 @@ public class FundamentalsMqttClient : ManagedMqttClient, IHostedService
var correlationId = topic.Substring(lastSlash + 1);
// 2. Dispatch to specific channel handlers
if (topic.Contains("fundamentals_Get", StringComparison.OrdinalIgnoreCase))
if (topic.StartsWith("services/request/fundamentals_Get", StringComparison.OrdinalIgnoreCase))
{
await OnFundamentalsGetAsync(payload, correlationId);
}
else if (topic.Contains("events_GetAll", StringComparison.OrdinalIgnoreCase))
else if (topic.StartsWith("services/request/events_GetAll", StringComparison.OrdinalIgnoreCase))
{
await OnEventsGetAllAsync(correlationId);
}
else if (topic.Contains("health_Ping", StringComparison.OrdinalIgnoreCase))
else if (topic.StartsWith("services/request/events_GetByMonth", StringComparison.OrdinalIgnoreCase))
{
await OnEventsGetByMonthAsync(payload, correlationId);
}
else if (topic.StartsWith("services/request/health_Ping", StringComparison.OrdinalIgnoreCase))
{
await OnHealthPingAsync(topic, correlationId);
}
@@ -156,6 +161,32 @@ public class FundamentalsMqttClient : ManagedMqttClient, IHostedService
}
}
/// <summary>
/// Handles events_GetByMonth RPC requests.
/// </summary>
private async Task OnEventsGetByMonthAsync(string payload, string correlationId)
{
if (string.IsNullOrWhiteSpace(payload)) return;
try
{
var request = (GetEventsByMonthRequest?)JsonSerializer.Deserialize(payload, typeof(GetEventsByMonthRequest), FinlyticJsonSerializerContext.Default);
if (request == null) return;
_logger.LogInformation("[{Channel}] [FundamentalsMqttClient] Processing RPC events_GetByMonth request for {Year}/{Month} [CorrelationId: {CorrelationId}]", "FundamentalsChannel", request.Year, request.Month, correlationId);
var events = await _dbService.GetEventsByMonthAsync(request.Year, request.Month);
var responseTopic = $"services/response/events_GetByMonth/{correlationId}";
_logger.LogInformation("[{Channel}] [FundamentalsMqttClient] Publishing monthly events RPC response to '{ResponseTopic}'", "FundamentalsChannel", responseTopic);
await PublishAsync(responseTopic, events);
}
catch (Exception ex)
{
_logger.LogError(ex, "[{Channel}] [FundamentalsMqttClient] Failed to process events_GetByMonth request.", "FundamentalsChannel");
}
}
/// <summary>
/// Handles health_Ping RPC requests.
/// </summary>