diff --git a/cmd/main.go b/cmd/main.go index 323103c..6ecef69 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -40,4 +40,33 @@ func main() { log.Printf("unable to commit txn %s\n", err) return } + + // ---- consumer ---- + //for { + // log.Println("in the for") + // select { + // case msg := <-partitionConsumer.Messages(): + // log.Printf("Consumed message offset %d\n", msg.Offset) + // if *logMsg { + // log.Printf("KEY: %s VALUE: %s", msg.Key, msg.Value) + // } + // consumed++ + // case <-signals: + // break ConsumerLoop + // } + //} + + // SIGUSR1 toggle the pause/resume consumption + //sigterm := make(chan os.Signal, 1) + //signal.Notify(sigterm, syscall.SIGINT, syscall.SIGTERM) + + //for keepRunning { + // <-sigterm + // log.Println("terminating: via signal") + // keepRunning = false + //} + //cancel() + //wg.Wait() + + //producerProvider.Clear() }