Kafka Containerization | 220106


210106

Still cranking that generator and LTE hot-spot

Docker Kafka

Alright looking this space in relation to containerization(docker images) there seems to be a couple options at the time of writing this(Jan 2022)

So these seem to be best supported options for docker images.

Straight up I have never heard of the confluentinc and wurstmeister before. Confluentic seems to be a company that seems to be mostly based in providing support of cloud Kafka, it also has own packages to interface with Kafka(I will get to those a lil later). Wurstmeister I don’t have that much insight into besides it seems to have been maintained for a while with a good amount of usage. I will be going with Bitnami cause I have used them for other images in this project and for some reason I am less worried about VM ware than Confluentic

210106

Still cranking that generator and LTE hot-spot

Docker Kafka

Alright looking this space in relation to containerization(docker images) there seems to be a couple options at the time of writing this(Jan 2022)

So these seem to be best supported options for docker images.

Straight up I have never heard of the confluentinc and wurstmeister before. Confluentic seems to be a company that seems to be mostly based in providing support of cloud Kafka, it also has own packages to interface with Kafka(I will get to those a lil later). Wurstmeister I don’t have that much insight into besides it seems to have been maintained for a while with a good amount of usage. I will be going with Bitnami cause I have used them for other images in this project and for some reason I am less worried about VM ware than Confluentic

So that up and running on local

So that up and running on local

Zookeeper

This something that i needed for Kafka to keep track of its stuff. Its’s kinda seems like it’s a kube controller for kafka.

Here is some article that goes into

Just wanted to note that in case someone look at the docker compose and wonder wtf is this zookeeper thing.

Go and Kafka

So like the docker images I will go over some the options that exist to interface with kafka and then I one I ended up going with(at least for now)

So I ended using segmentio/kafka-go and let the owner of this repo do all the thinking for me link to explaintation of each of these options. Note that confluent kafka is the one I spoke to earlier

Seems like a good option seems to be a similar pattern to the pgx package i used for postgres interfacing

Zookeeper

This something that i needed for Kafka to keep track of its stuff. Its’s kinda seems like it’s a kube controller for kafka.

Here is some article that goes into

Just wanted to note that in case someone look at the docker compose and wonder wtf is this zookeeper thing.

Go and Kafka

So like the docker images I will go over some the options that exist to interface with kafka and then I one I ended up going with(at least for now)

So I ended using segmentio/kafka-go and let the owner of this repo do all the thinking for me link to explaintation of each of these options. Note that confluent kafka is the one I spoke to earlier

Seems like a good option seems to be a similar pattern to the pgx package i used for postgres interfacing

connection style

What’s Next

I am going to try and implement the sage pattern for the relationship between the server and channels for channel CRUD

  • so on channel creation
  • json will be sent in validator middle ware
  • then routed to the create channel which will
  • trigger the events so a event will fire off to the server service to check if that server exist
  • then if it does send a message back to the channel service to create that channel with that associated server id
  • and if not we respond back to the channel service with that error and pass that along.

So by it’s self there really doesn’t seem a need to have all of that to check if a server_id exist, but we can add to this later for when need to check who is doing it and if they can or are even part of that server.

Also thinking about this give us extra information to easily go back later implement an audit log for servers. That is far out, but just a thought.

So let see if can actualize something similar to his.

Forward.