In a previous series that I wrote on building a micro service from the ground up with Quarkus and Kotlin, the service was secured using OpenID Connect. The premise was that the service would be behind an API gateway and would be invoked by another micro service using JWTs issued by an OIDC provider. For component tests we used Keycloak as the provider, which also is a good choice for hosting your own OIDC server. We also demonstrated how Okta could be used as an external OIDC provider for issuing JWTs. In this article we will explore using Amazon Cognito.

What is Amazon Cognito


Photo by Belinda Fewings on Unsplash

This is a part of a series on building a microservice from the ground up with Quarkus and Kotlin. We have built a microservice. We have comprehensive unit and component tests. We can build it locally and produce docker images for both running in a JVM and natively with GrallVM. Now we need a pipeline for an automated build process.

The pipeline will

  • checkout the latest revision from github
  • build the multi-module maven project
  • install the artifacts into a local maven repository
  • build the docker images
  • run the component tests using the local docker images
  • push the docker image to…


Photo by Guillaume TECHER on Unsplash

Jib is a google project for building optimised docker images for JVM applications without the need for a docker daemon or docker build files. The library has maven and gradle plugins for building docker images and pushing them to a docker repository.

If you are a wiz at writing docker scripts and would rather control every aspect of the docker build you might be tempted to skip Jib. However, it does provide a useful starting point and gets your application built and deployed quickly. …


Photo by Mathew Schwartz on Unsplash

This is the fifth part of a series on building a microservice in Quarkus. The other parts were:

In this part we are going to deploy the service running in GraalVM.

GraalVM is a game-changing technology that has only been production ready since 2019. It is a Java VM that contains a JIT compiler and supports building of native images allowing AOT (Ahead Of…


Photo by Laura Ockel on Unsplash

One of the most common use cases for messaging applications is to retrieve files from a directory and process the results.
Spring Integration has great support for this and the DSL makes it very easy to set up.

We will write a spring boot application that will:

  1. Poll a directory for files that match a regex pattern.
  2. On reading in a file it will transform the content to a String and send it to an inbound message channel
  3. Another integration flow will listen in on the Inbound channel and process the incoming message by simply reversing the string and writing…


Photo by Jason Dent on Unsplash

This is the fourth part in a series on building a microservice from the ground up with Quarkus, Kotlin and Debezium. The service is for sending SMS messages.

In Part One we built the basic framework and added persistence. In the second part we used CDC to generate events from the persisted SMS Messages. We built a message handler to process the messages that were sent to the Kafka topic. In part three we added a couple of SMS providers and a router that sent the messages to the third party provider based on a simple random algorithm. …


Photo by Marjan Grabowski on Unsplash

This is the third part in a series on building a microservice from the ground up with Quarkus, Kotlin and Debezium. The service is for sending SMS messages.

In Part One we built the basic framework and added persistence. In the second part we used CDC to generate events from the persisted SMS Messages. We built a message handler to process the messages that were sent to the Kafka topic.

Here is the current state of the message handler

At the end of part two the message handler just updates the message status to Delivered (line 11) so we…


Photo by Matthew Henry from StockSnap

This is the second instalment in a series on building a microservice from the ground up with Quarkus, Kotlin and Debezium.

In part one we built a simple REST API in Quarkus for persisting SMS messages. We used testcontainers to run the service in a docker container and establish that everything worked as expected.

In this part we’ll use the transactional outbox pattern to generate events when the messages are persisted. We can then process the messages asynchronously and, ultimately, get the SMS message to the end user’s mobile device.

A common pattern in microservices is to generate events when…


Photo by Sven Read on Unsplash

This is a multi-part series on creating a microservice from scratch. It will be a production-quality application that will highlight the use of the following technologies:

  • Quarkus
  • GraalVM
  • Kotlin
  • Postgres (Persistence)
  • Panache (JPA)
  • Flyway (Database migration)
  • Kafka (Messaging)
  • Debezium, Kafka Connect (Transactional Outbox pattern)
  • Okta (OIDC)
  • Open API
  • Docker
  • Test Containers
  • Wiremock

The application will be be constructed in stages, with each stage adding additional functionality. Each release will be deployable and fully tested, but the service won’t be ready for production until the final stage.

I have used spring boot for years and it is a fantastic framework. In…

Technology pathfinder who likes to code when not on his bike

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store