I have encountered the following problem: Nasty thing. It says, that HikariCP can not acquire a new database connection and it gave up after some 30 seconds. Where is the problem? Let’s try to simulate the problem. We want to query database and…
Category: <span>Programavimas</span>
A while ago we’d created docker-compose.yml for Kafka and Zookeper. Today I’ve noticed the problem with the old configuration – it looks like it does not work properly with Test Containers. So, I have replaced the old configuration with Confluent’s Kafka and Zookeeper:…
I’m helping to write a Java library (JAR file) which result is just one @Configuration file that integrates Redis. But the problem became – how to test it? It turned out, that it’s not so easy to figure out which dependencies to use…
A Semantic versioning is a simple and popular concept these days. As we all (?) use Git in our daily life, it would be great if we could create Git tags based on Semantic versioning, right? Well, this little script could help us:…
In order to know how long it takes to get a response from external system, we could use curl: If you don’t need to see response, add -o parameter: curl -o /dev/null -s -w ‘Total: %{time_total}s\n’ ‘http://www.example.net/some/url/here’
You have two versions of JDK – let’s say Java 11 and Java 17 installed on your Mac. And you want to switch between default version – how could you do that? It’s simple. First of all, let’s figure out what Java versions…
Let’s say we have a REST endpoint and we want to send a message via Spring’s Cloud Stream Kafka. Easy? Yes, if we’re using a legacy annotation model – yes. But what if we want to send a Kafka message, when someone calls…
I use Kafka in my Docker Compose file. My docker-compose.yaml looks like this: Unfortunately, when I start and restart Kafka’s instance in Docker Compose I was constantly getting random errors. After some googling, I found that KAFKA_ADVERTISED_HOST_NAME is deprecated – please see https://github.com/wurstmeister/kafka-docker/wiki/Connectivity…
I have just posted an article on Zedge blog on Medium about Kotlin’s extension functions. If you’re interested, please take a look: https://medium.com/zedge/extension-functions-in-kotlin-44563d7880f5