public MainForm() { InitializeComponent(); //saliente.Name = "inicio_prueba"; //entrante.Name = "fin_prueba"; server = new TcpInterQueueServer(new IPEndPoint(IPAddress.Any, 1234), 0, true); }
public QueueDocument() { InitializeComponent(); var ep = new IPEndPoint(IPAddress.Any, 7543); theserver = new TcpInterQueueServer(ep, 6, false); }
public static void Start() { var queues_directive = Config.GetConfigurationString("interqueue", "queues", ""); server = new TcpInterQueueServer(new IPEndPoint(IPAddress.Any, Config.GetConfigurationInt("interqueue", "listen_port", 7532)), 0, false); if (String.IsNullOrEmpty(queues_directive)) { return; } var queues = queues_directive.Split(",".ToCharArray()); foreach (var queue in queues) { // validamos si la cola esta deshabilitada. if (Config.GetConfigurationBool(queue, "disabled", false)) { continue; } // creo e inicializo el nodo local, quien consume la cola. var local_queue = Config.GetConfigurationString(queue, "local_queue", ""); if (String.IsNullOrEmpty(local_queue)) { T.ERROR("Queue: {0} falta setear el nombre local.", queue); continue; } var label_reformat_expression = Config.GetConfigurationString(queue, "label_reformat_expression", ""); var remote_queue = Config.GetConfigurationString(queue, "remote_queue", local_queue); var remote_host = Config.GetConfigurationIPAddress(queue, "remote_host", IPAddress.None); if (remote_host == IPAddress.None) { T.ERROR("Queue: {0} falta setear el host remoto.", queue); continue; } var remote_port = Config.GetConfigurationInt(queue, "remote_port", 7532); var remote_ep = new IPEndPoint(remote_host, remote_port); var tcpcli = new TcpInterQueueClient_V1_1(remote_ep, remote_queue); var dispatcher = new QueueBatchConsumer(local_queue, tcpcli, label_reformat_expression); dispatchers.Add(queue, dispatcher); dispatcher.Start(); } }