Remove Old Stuffs for Refactor xEvent Service for Kafka and RabbitMQ ...

This commit is contained in:
2026-08-18 00:00:27 +03:30
parent a94013b591
commit 699fc721f5
18 changed files with 296 additions and 989 deletions
+17 -40
View File
@@ -1,51 +1,28 @@
using System.Collections.Generic;
using RabbitMQ.Client;
using xEventService.Constants;
namespace xEventService.Configuration {
namespace xEventService.Configuration
{
/// <summary>
/// a configuration class for describing how to connect rabbit mq server
/// and how channels must be declared ...
/// </summary>
public class XEventServiceConfiguration {
public string Server { get; set; }
public int Port { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public class XEventServiceConfiguration
{
/// <summary>
/// Message Broker Address ...
/// </summary>
public string Url { get; set; }
//
public bool AllowDynamicQueues { get; set; } = true;
public XQueueArgs DefaultQueueArgs { get; set; } = new XQueueArgs ();
public IDictionary<string, XQueueArgs> Queues { get; set; }
/// <summary>
/// Max Retries to Sending Message ...
/// </summary>
public int MaxRetries { get; set; } = 3;
//
public bool AllowDynamicExchangess { get; set; } = true;
public XExchangeArgs DefaultExchangeArgs { get; set; } = new XExchangeArgs ();
public IDictionary<string, XExchangeArgs> Exchanges { get; set; }
//
public static XEventServiceConfiguration GetDefaults () {
return new XEventServiceConfiguration {
Port = 5672,
Username = "guest",
Password = "guest",
Server = "localhost",
Queues = new Dictionary<string, XQueueArgs> { { "XMainQueue", new XQueueArgs { Name = "XMainQueue" } }
}
};
}
}
public class XQueueArgs {
public string Name { get; set; }
public bool Durable { get; set; } = false;
public bool Exclusive { get; set; } = false;
public bool AutoDelete { get; set; } = true;
}
public class XExchangeArgs {
public string Name { get; set; }
public string Type { get; set; } = ExchangeType.Fanout;
public bool Durable { get; set; } = false;
public bool AutoDelete { get; set; } = true;
/// <summary>
/// Allowed Message Broker ...
/// </summary>
public XEventBroker Broker { get; set; } = XEventBroker.None;
}
}