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
|
ACTION=apply
|
||||||
|
|
||||||
build-producer: dependencies
|
build: dependencies
|
||||||
go build -o out/kafka-producer ./cmd/producer.go
|
go build -o out/kafka ./cmd/main.go
|
||||||
|
|
||||||
build-consumer: dependencies
|
|
||||||
go built -o out/kafka-consumer ./cmd/consumer.go
|
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
go mod tidy
|
go mod tidy
|
||||||
|
|
||||||
run:
|
run:
|
||||||
./out/kafka-producer -c ./configuration.yaml
|
./out/kafka -c ./configuration.yaml
|
||||||
|
|
||||||
infrastructure-local:
|
infrastructure-local:
|
||||||
cd manifest && \
|
cd manifest && \
|
||||||
|
@ -2,7 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
. "antoine-roux.tk/kafka/internal/configuration"
|
. "antoine-roux.tk/kafka/internal/configuration"
|
||||||
"fmt"
|
|
||||||
"github.com/Shopify/sarama"
|
"github.com/Shopify/sarama"
|
||||||
"log"
|
"log"
|
||||||
_ "net/http/pprof"
|
_ "net/http/pprof"
|
||||||
@ -30,7 +29,7 @@ func main() {
|
|||||||
_, _, err := producer.SendMessage(&sarama.ProducerMessage{
|
_, _, err := producer.SendMessage(&sarama.ProducerMessage{
|
||||||
Topic: string(application.EmitterTopic),
|
Topic: string(application.EmitterTopic),
|
||||||
Key: nil,
|
Key: nil,
|
||||||
Value: sarama.StringEncoder(fmt.Sprintf("test number %d", i)),
|
Value: sarama.StringEncoder("test"),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Message delivery error %s\n", err)
|
log.Printf("Message delivery error %s\n", err)
|
@ -13,7 +13,7 @@ kafka:
|
|||||||
# k view-secret -n streaming kafka-user user.key
|
# k view-secret -n streaming kafka-user user.key
|
||||||
key: <client pem 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>
|
ca: <server root certificate>
|
||||||
group-name: some-consumer-name
|
group-name: some-consumer-name
|
||||||
topics:
|
topics:
|
||||||
|
Loading…
Reference in New Issue
Block a user