Skip to main content
Next, create the consumer application by pasting the following Go code into a file named consumer.go.
Fill in the appropriate <BOOTSTRAP SERVERS> endpoint and <API KEY> in the bootstrap.servers and sasl.password properties where the consumer is instantiated via the kafka.NewConsumer method. Compile the consumer as follows: