Kafka - A Quick and Simple Guide

April 08, 2025 ・0comments
Introduction Apache Kafka is a distributed event streaming platform. Originally developed at LinkedIn, it is now an open-source project under the Apache Software Foundation. Kafka is widely used for building real-time data pipelines and streaming applications. What is Apache Kafka? Kafka is a messaging system that lets applications publish (write), subscribe (read), store, and process streams of data in real-time. Kafka Core Concepts 1. Producers and Consumers      Producers → Send data to Kafka topics.      Consumers → Read data from Kafka topics. 2. Topics and Partitions Topic → Logical channel for a specific type of data. Partition → Topi…
Read post

XSLT Date and Time Manipulation

July 03, 2024 ・0comments
In XSLT (Extensible Stylesheet Language Transformations) 2.0 or later, we can perform several date and time manipulation processes. I thought of writing a blog post so others can easily find examples as well. Basic Date & Time XSLT Functions:  current-date() - Returns the current date of the server that XSLT runs current-time() - Returns the current time of the server that XSLT runs current-dateTime() - Returns the current date and time of the server that XSLT runs implicit-timezone() - Returns the implicit time zone of the server that XSLT runs < xsl : stylesheet xmlns : xsl = "http://www.w3.org/1999/XSL/Transform"    …
Read post

Global Exception Handling With Spring Boot

June 28, 2024 ・0comments
Image
In a Spring Boot controller, things can sometimes go wrong. For example, an API consumer might not send the expected path parameter or header value. They might call the API with an invalid payload or encounter an unexpected runtime error. When these kinds of errors occur, we can use Spring Boot's Global Exception Handling mechanism to manage them and provide meaningful responses back to the API consumer. @ExceptionHandler is used to handle exceptions in specific controllers classes and/or methods level. In a Spring Boot Restful service, errors can be handled in three different ways: Using ControllerAdvice - This annotation allows global…
Read post

Spring Boot Key Annotations With Examples

June 26, 2024 ・0comments
When developing a RESTful service (REST API) using Spring Boot, need to have clear understanding of some of the annotations provided by Spring Boot Web.  @RestController - RestController is class level annotation used to define a class as a rest full service and it also combines @Controller and @ResponseBody annotations. So the response object is automatically serialised into JSON format.   @RequestMapping - RequestMapping is used to map web requests to a specific controller or method. For RESTful services, the RequestMapping annotation is typically used at the class level, with HTTP method-specific annotations used at the method level. @…
Read post