protected void Emit(List <object> tuple, string stream = "default", long task = 0, bool needTaskIds = false) { string id = null; if (IsGuaranteed) { id = NextId(); } VerificationResult result = VerifyOutput(stream, tuple); if (result.IsError) { Logger.Error($"{result} for next tuple: {tuple}."); } else { SpoutTuple message = new SpoutTuple() { Id = id, Task = task, Stream = stream, Tuple = tuple, NeedTaskIds = needTaskIds }; Channel.Send(message); if (id != null && message != null && policy != null) { PendingQueue.Set(id, message, policy); } } }
internal SpoutOutput(SpoutTuple st, string compId) { Id = st.Id; this.ComponentId = compId; this.Stream = st.Stream; this.Task = st.Task; this.Tuple = st.Tuple; this.NeedTaskIds = st.NeedTaskIds; }