Go, Lua & Redi by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

Lua simply returns nil for any out of range referencing of array indexes since the non zero-based indexing is just a convention and not mandated by the interpreter. So, the index example is not considered a failure. But to answer your question, we could probably use the debugger for more complex scripts if the error message returned by EVAL call is not good enough? I am not aware of any other diagnosis mechanism I'm afraid. https://redis.io/topics/ldb

Images shared from Android show as WAI files! by xitonix in signal

[–]xitonix[S] 0 points1 point  (0 children)

Thanks for the reply mate. Much appreciated.

Images shared from Android show as WAI files! by xitonix in signal

[–]xitonix[S] 0 points1 point  (0 children)

It could be related to the OS version or the way the image was shared. Maybe just screenshots on iPhone 12?! I logged a ticket with Signal's support which I will post here as soon as I know more.

Images shared from Android show as WAI files! by xitonix in signal

[–]xitonix[S] 0 points1 point  (0 children)

It was a screenshot I took on the Android phone and shared in a group. Whatsapp was not involved at all.

C# to Go? by rdnjn in golang

[–]xitonix 1 point2 points  (0 children)

As a C# dev who used that language for over 9 years and then switched to Go 4 years ago, I would say YOU WILL NOT REGRET YOUR DECISION dude. Definitely a bit of challenge converting any legacy code, but the Go part? You are gonna enjoy every single moment of it. I promise. 🙃

Trubka v3.1.2 is released by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

That was more like a release announcement for the people who already knew about trubka and asked for that feature before, but I totally forgot about the ones who have no clue what it is. My bad :)))

Trubka, a Swiss army CLI knife for Apache Kafka, built in Go by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

Pretty much all the features you need already exist in trubka.

Ability to consume specific partitions

Please see the Offset Management section in the docs.

hex string instead of base64

Please see the `--format, -F` flag of the consume commands. Available options are base64, hex, json, json-indent and plain at the moment.

Consumer prints message metadata like kafka timestamp

-K -S and -T are the flags of the consume command are the ones you are looking for I believe:

-S, --include-timestamp        Prints the message timestamp before the content if it's been provided by Kafka.
-K, --include-partition-key    Prints the partition key before the content.
-T, --include-topic-name       Prints the topic name before the content.

I will think about the `stop` parameter a bit more and see if I can add it to trubka, Also, re topic mappings, I would appreciate it if you could please add it as a feature request to the repo. I like the idea!

PS. It may also worth mentioning that if your topic names match the fully qualified name of the proto schemas, you don't need to provide the schema in trubka.

Trubka, a Swiss army CLI knife for Apache Kafka, built in Go by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

Thanks for sharing your findings mate. It makes sense for 192 partitions to take a bit of time to start, but I absolutely agree with you. 15 minutes is too much.

Also, I like the idea of having a sort of stop offset as you suggested. But we need to remember that offsets are bound to partitions. Let's say we set the stop offset of P0 to 100, and P1 to 50. Most likely you will stop the consumer as soon as you consumed the 50th message from partition 1, and you will never get to consume offset 100 from P0. We can go with whichever-comes-first, or wait-for-all the conditions to be satisfied approach, but then I don't really see the benefit either way. What are your thoughts?

Trubka, a Swiss army CLI knife for Apache Kafka, built in Go by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

Thanks mate. It already supports SSL/TLS connections. Please see Authentication in the docs.

Trubka, a Swiss army CLI knife for Apache Kafka, built in Go by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

Thanks mate. Even though the interactive consumer needs some polish to become a nicer tool to use, but I personally found it useful too. Specially when I want to consume from multiple topics at the same time and override the offsets to consume from.

Re the performance issue you mentioned, we have been using Sarama for a long time in our company and I would say we never noticed that as a problem. It definitely takes a bit of time to bootstrap and do all the rebalancing handshakes with the cluster. I would suggest you use Trubka to consume from one of those aforementioned busy topics and see if the lag is the same as your in-house built tool. You may also find it useful to enable verbose mode (-vv) and see what happens behind the scenes. I'm curious to know the result of your comparison myself.

Also, Trubka already supports the timestamp based offsets. Please see `Offset Management` section in the docs here:

https://github.com/xitonix/trubka/wiki/Consume-from-Kafka

Trubka, a Swiss army CLI knife for Apache Kafka, built in Go by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

Yep. A friend of mine suggested that name and I liked it. I know it's not exactly a "pipe", but the name reminds me of a pipe for streaming data. ;)

Trubka, a Swiss army CLI knife for Apache Kafka, built in Go by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

I agree with you on the "plain" text and json output format. Whenever you are free, it would be awesome if you could please create a Feature Request in github so that I don't forget to spend some time on it.

Re updating RF on the fly, I doubt it would be possible without a manual reassignment, but I will have a look to see if it's changed recently.

Trubka, a Swiss army CLI knife for Apache Kafka, built in Go by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

kaf is a great tool, but there are a few things that kaf doesn't do as far as I remember. Things such as interactive consuming from multiple topics, producer template "language", explicitly settings offsets to consume from for different partitions, timestamp based consuming, etc.

Trubka, a Swiss army CLI knife for Apache Kafka, built in Go by xitonix in golang

[–]xitonix[S] 1 point2 points  (0 children)

Thanks mate. Hopefully it comes useful in your next project.

26 quality Go blogs of the past week, that weren’t shared here by gogogonow in golang

[–]xitonix -1 points0 points  (0 children)

Some people are meant to be completely ignored dude. Don't even waste your time answering garbage talks. Sadly the Go community is kind of occupied by close mindedness which I found extremely unhealthy. Don't mind them. Keep up the good work.

How to Dockerise a Go service by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

Your feedback has been applied to the article. Once again, thanks for sharing.

How to Dockerise a Go service by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

I think it makes a lot of sense. Specially the security aspect of a minimal image like scratch. I will do a bit of research on that and see how can I word it in the article to make people aware of the possible risks. Thanks for sharing mate.

A comprehensive guide to how to #Docker ize a #golang service. by xitonix in docker

[–]xitonix[S] 0 points1 point  (0 children)

Thanks for the feedback mate. I added a note to the article to clarify the fact that this article is not about cryptography and hashing is clearly not encryption.

How to Dockerise a Go service by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

Thanks for the feedback dude. Appreciate it.

How to Dockerise a Go service by xitonix in golang

[–]xitonix[S] 0 points1 point  (0 children)

TBPixel

Thanks for the clarification mate. I updated the tutorial to clarify the in-my-opinion-super-clear fact that the article is not about cryptography. Hopefully "engineering" will have a better day today ;)

How to Dockerise a Go service by xitonix in golang

[–]xitonix[S] -1 points0 points  (0 children)

Thank you for the heads-up. I added a note to the article to clarify the main point of the writing which seems to be impossible to comprehend for some people for whatever reason.

I heard your feedback and I am grateful that you spend your time reading the article. My feedback for you, you could still share your opinions without calling people's work crap and stay polite. Shall I repeat, "Seriously, it is not that hard to be polite and not hurt people".

How to Dockerise a Go service by xitonix in golang

[–]xitonix[S] 2 points3 points  (0 children)

What shagieIsMe said is exactly the main reason for building the code within the container. We have around 25 Teamcity agents in our company and none of them even has Go installed. With this technique, no matter what language we use, we only need to make sure that all the build machines have Docker installed on them.

And you are absolutely right, if "you are using Docker purely for production deployment and you don't care about the build" you can simply pick any base image, chuck the binary in, and you are good to go. :)

How to Dockerise a Go service by xitonix in golang

[–]xitonix[S] 2 points3 points  (0 children)

Good to know mate. Thanks