Compare commits
2 Commits
main
...
feature/co
Author | SHA1 | Date | |
---|---|---|---|
405fa5ec52 | |||
be69809fd0 |
11
Makefile
11
Makefile
@ -1,18 +1,15 @@
|
||||
.PHONY: build-producer build-consumer run dependencies infrastructure-local infrastructure-prod topic-scram topic-ssl consume-topic
|
||||
.PHONY: build
|
||||
|
||||
ACTION=apply
|
||||
|
||||
build-producer: dependencies
|
||||
go build -o out/kafka-producer ./cmd/producer.go
|
||||
|
||||
build-consumer: dependencies
|
||||
go built -o out/kafka-consumer ./cmd/consumer.go
|
||||
build: dependencies
|
||||
go build -o out/kafka ./cmd/main.go
|
||||
|
||||
dependencies:
|
||||
go mod tidy
|
||||
|
||||
run:
|
||||
./out/kafka-producer -c ./configuration.yaml
|
||||
./out/kafka -c ./configuration.yaml
|
||||
|
||||
infrastructure-local:
|
||||
cd manifest && \
|
||||
|
@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
. "antoine-roux.tk/kafka/internal/configuration"
|
||||
"fmt"
|
||||
"github.com/Shopify/sarama"
|
||||
"log"
|
||||
_ "net/http/pprof"
|
||||
@ -30,7 +29,7 @@ func main() {
|
||||
_, _, err := producer.SendMessage(&sarama.ProducerMessage{
|
||||
Topic: string(application.EmitterTopic),
|
||||
Key: nil,
|
||||
Value: sarama.StringEncoder(fmt.Sprintf("test number %d", i)),
|
||||
Value: sarama.StringEncoder("test"),
|
||||
})
|
||||
if err != nil {
|
||||
log.Printf("Message delivery error %s\n", err)
|
@ -13,7 +13,7 @@ kafka:
|
||||
# k view-secret -n streaming kafka-user user.key
|
||||
key: <client pem key>
|
||||
|
||||
# k view-secret cluster-development-cluster-ca-cert ca.crt
|
||||
# k view-secret kafka-dev-listener-certificate ca.crt
|
||||
ca: <server root certificate>
|
||||
group-name: some-consumer-name
|
||||
topics:
|
||||
|
Loading…
Reference in New Issue
Block a user