コード例 #1
0
        static void Main(string[] args)
        {
            List <Collectible> collectibles = _collectibleRepository.findAll();

            foreach (Collectible collectible in collectibles)
            {
                _kafkaRepository.Create("billing", JsonConvert.SerializeObject(collectible));
            }
        }
コード例 #2
0
        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);
            }
        }