static void Main(string[] args) { List <Collectible> collectibles = _collectibleRepository.findAll(); foreach (Collectible collectible in collectibles) { _kafkaRepository.Create("billing", JsonConvert.SerializeObject(collectible)); } }
public bool queue(Transaction transaction) { try { KafkaProducerRepository kafkaProducerRepository = new KafkaProducerRepository(); kafkaProducerRepository.Create("decline_simple", JsonConvert.SerializeObject(transaction)); return(true); } catch (Exception ex) { Console.WriteLine($"Exception is: {ex.Message}"); return(false); } }