public static void TryEnqueue(this IBusContext ctx, CacheMessage message) { if (message == null) { return; } ctx.Enqueue(ContextName, message); }
private static void SendInternal(this IBusContext ctx, CacheMessage message, bool onCallback = false) { if (onCallback) { message.Token = message.Token ?? message.RequestId.ToString(); MessageLogger.Sended(message); } ctx.Enqueue(ContextName, message); }
protected void SendMessage(FileImporterMessage message) { try { _busContext.Enqueue <FileImporterMessage>("GE-ImportacaoArquivos", message); } catch (Exception ex) { throw ex; } }
private static void SendInternal <T>(this IBusContext ctx, T message, bool onCallback = false, string contextName = null) where T : class, ISpecializedMessage { contextName = contextName ?? message.ContextName; if (onCallback) { message.Token = message.Token ?? message.RequestId.ToString(); MessageLogger.Sended(message); } ctx.Enqueue(contextName, message); }