private async void sendBaristaOrder(LineItemEvent itemEvent)
        {
            using (var p = new ProducerBuilder <Null, string>(_producerConfig).Build())
            {
                try
                {
                    string itemString = JsonSerializer.Serialize(itemEvent);
                    var    dr         = await p.ProduceAsync("barista-in", new Message <Null, string> {
                        Value = itemString
                    });

                    sendWebUpdate(itemString);
                    Console.WriteLine(DateTime.Now + $" - Sending Order to Barista '{dr.Value}' to '{dr.TopicPartitionOffset}'");
                }
                catch (ProduceException <Null, string> e)
                {
                    Console.WriteLine($"Delivery failed: {e.Error.Reason}");
                }
            }
        }
 public static String toInProgressUpdate(LineItemEvent lineItemEvent)
 {
     return(toJson(new InQueueUpdate(lineItemEvent)));
 }
 public void addEvent(LineItemEvent orderEvent)
 {
     this.getEvents().Add(orderEvent);
 }