public void SendEvent(EventoHttpLivroNegocios e) { try { //bool bsinaliza = queueHttpLNG.IsEmpty; queueHttpLNG.Enqueue(e); //if (bsinaliza) //{ // lock (syncQueueHttpLNG) // { // Monitor.Pulse(syncQueueHttpLNG); // } //} } catch (Exception ex) { logger.Error("SendEvent(EventoHttpLivroNegocios): " + ex.Message, ex); } }
private void despacharEventos(object sender, HttpLivroNegociosEventArgs args) { try { string mensagem = null; EventoHttpLivroNegocios httpLNG = args.Evento; if (dctSessions.ContainsKey(httpLNG.instrumento)) { mensagem = JsonConvert.SerializeObject(httpLNG); mensagem = MDSUtils.montaMensagemHttp(ConstantesMDS.TIPO_REQUISICAO_LIVRO_NEGOCIOS, httpLNG.instrumento, null, mensagem); if (!String.IsNullOrEmpty(mensagem)) { queueToStreamer.Enqueue(mensagem); } } } catch (Exception ex) { logger.Error("despacharEventos(): " + ex.Message, ex); } }