public void On(ISubscriptionContext context, PingEvent pingEvent) { count++; context.Logger.LogInformation($"Received: {pingEvent.Message}"); context.ForkEvent(new PongEvent() { Message = $"Echo {pingEvent.Message}", }); }
public void On(ISubscriptionContext context, PongEvent pongEvent) { count++; context.Logger.LogInformation($"Received: {pongEvent.Message}"); // Send a ping event unless we have reach max count if (count < SendFirstPing.NumberOfEvents) { context.ForkEvent(new PingEvent() { Message = $"Ping #{count + 1}", }); } }