<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Krishna on Medium]]></title>
        <description><![CDATA[Stories by Krishna on Medium]]></description>
        <link>https://medium.com/@saikrishnasaski?source=rss-c83be30e0ccc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jpkk5DNn9mxa8-94TGHEgg.jpeg</url>
            <title>Stories by Krishna on Medium</title>
            <link>https://medium.com/@saikrishnasaski?source=rss-c83be30e0ccc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 16:02:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@saikrishnasaski/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Advanced Kafka Producer Configurations]]></title>
            <link>https://medium.com/kafka-with-spring/advanced-kafka-producer-configurations-823d4dd25396?source=rss-c83be30e0ccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/823d4dd25396</guid>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[apache-kafka]]></category>
            <category><![CDATA[kafka-producer]]></category>
            <category><![CDATA[idempotent-producer]]></category>
            <dc:creator><![CDATA[Krishna]]></dc:creator>
            <pubDate>Thu, 20 Jun 2024 06:59:27 GMT</pubDate>
            <atom:updated>2024-06-20T06:59:27.643Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*kR6gtyhqnz4rbt2bYHCcZw.png" /><figcaption>Kafka Producer</figcaption></figure><p><strong>Introduction</strong></p><p>In previous <a href="https://medium.com/kafka-with-spring/apache-kafka-with-spring-boot-2cbf16eda41a">article</a> we have seen Basic Kafka Producer example. In this article I am going to cover advanced kafka producer configurations to send kafka messages with high compression, throughput, and efficiency of requests and to handle failure scenarios.</p><p><strong>Batching</strong></p><p>First we will try to understand few producer configurations related to batching. Batch means group of kafka messages.</p><p><strong><em>max.inflight.requests.per.connection (default = 5) -&gt;</em></strong> means how many batches can be sent parallely to kafka broker. This setting is defined per partition. 1 Request contains 1 Batch.</p><p><strong><em>linger.ms (default = 0) -&gt;</em></strong> How long to wait until we send a batch to kafka. This can introduce small delay in message processing but decrease network calls between kafka producer and kafka cluster (as we are sending messages in batches) which increase throughput and producer efficiency.</p><p><strong><em>batch.size (default = 16Kb) -&gt;</em></strong> As our code executes kafkaTemplate.send() method or (producer sends message to kafka), all messages stays in temporary buffer. Messages keeps going to buffer till configured time (linger.ms). After configured time, batch is sent to kafka. If batch is filled before linger.ms batch is sent to kafka right away.</p><p>By default, Kafka producers try to send records as soon as possible. <em>max.inflight.requests.per.connection (default = 5)</em> meaning there are 5 batches are in flight. After this if producer sends any messages, kafka starts batching all these messages until linger.ms, After linger.ms batch is ready to be sent to kafka. Even if the batch is ready, the producer will not send it out to Kafka if the maximum number of in-flight batches (controlled by max.in.flight.requests.per.connection) has been reached. The producer will wait until some of the in-flight requests are acknowledged before sending the next batch.</p><p><strong>Handling Failure Scenarios in Kafka Producers</strong></p><p>System Failures or Network failures are common in software systems and in fact we cannot prevent them from happening. The only thing we can do is design our system resilient to such failures. To handle this type of scenarios in kafka producer we have config called Producer Retries.</p><p><strong><em>retries (default= Integer.MAX_VALUE ):</em></strong> Producer attempts to send a message for this configured number of retries before marking it as failed.</p><p><strong><em>delivery.timeout.ms (default = 120000 (2 min)):</em> </strong>Producer doesn’t retry the record forever if retries= Integer.MAX_VALUE, it is bounded by timeout. Record will be failed if it cannot be delivered within this configured time.</p><p><strong><em>retry.backoff.ms (default = 100ms):</em></strong> By default, producer waits 100ms between each retry. You can configure this value using retry.backoff.ms parameter.</p><p>Having retires, delivery timeout, retry backoff parameters configured, producer can retry requests which are failed (Due to network glitch, Insufficient number of In Sync replicas or Kafka Cluster outage or request is sent to kafka but ack doesn’t reach producer due to network error) and these request can be sent to kafka and get acknowledged.</p><p><strong>Problems with Retries:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*2KPe64O7xvch6yP2Aj7k_A.png" /><figcaption>Duplicate Messages</figcaption></figure><p><strong><em>Duplicate Messages:</em></strong><em> </em>When<em> </em>publisher sends request to kafka and kafka sends ack to producer, but ack never reaches producer due to network error. So in this case producer retries the failed request and gets ack from kafka. In this scenario producer sent same message twice to kafka ending up in duplicate messages. In next section we will cover how to avoid duplicate messages in case of retries.</p><p><strong><em>Ordering:</em></strong> Kafka guarantees ordering within partition. Assume Kafka sent two requests one after other to the same partition but due to some issues 1st request failed to reach kafka and second request sent to kafka successfully. In this case ordering is lost within partition. We will cover how to avoid this scenario too.</p><h3><strong>Kafka Indempotent Producer</strong></h3><p>Idempotent producer ensures that duplicates are not introduced due to unexpected producer retries.</p><p><strong>Version Availability</strong></p><blockquote>Producer idempotence can be enabled for Kafka versions &gt;= 0.11</blockquote><p><strong>Internal working of Idempotent producer:</strong></p><p>Producer is assigned unique producer id (PID) and each message is assigned sequence number that gets incremented for every message by producer. This PID and sequence number combination is maintainer per topic per partition basis on producer side. On a broker side largest PID-Sequence number is maintained per topic per partition basis. Any lower PID-sequence number will be discarded ( as it will a duplicate ).</p><blockquote>Idempotence can be enabled using enable.idempotence=true in kafka producer.</blockquote><p><strong>Now the Default</strong></p><p><strong>Starting with Kafka 3.0</strong>, producers are by default having enable.idempotence=true and acks=all. See <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-679%3A+Producer+will+enable+the+strongest+delivery+guarantee+by+default">KIP-679</a> for more details.</p><p><strong>Conclusion</strong></p><p>Fine tuning kafka producer properties like batching, compression, retries according to your requirements is important. It is recommended to enable idempotency in producers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=823d4dd25396" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kafka-with-spring/advanced-kafka-producer-configurations-823d4dd25396">Advanced Kafka Producer Configurations</a> was originally published in <a href="https://medium.com/kafka-with-spring">kafka with spring</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Custom Health Indicators in Spring Boot]]></title>
            <link>https://medium.com/backend-with-spring-boot/custom-health-indicators-in-spring-boot-2763d0bcd07a?source=rss-c83be30e0ccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/2763d0bcd07a</guid>
            <category><![CDATA[database-health-checks]]></category>
            <category><![CDATA[spring-boot-actuator]]></category>
            <category><![CDATA[kafka-health-check]]></category>
            <category><![CDATA[custom-health-indicator]]></category>
            <category><![CDATA[custom-health-checks]]></category>
            <dc:creator><![CDATA[Krishna]]></dc:creator>
            <pubDate>Sat, 08 Jun 2024 08:45:37 GMT</pubDate>
            <atom:updated>2024-06-08T08:46:22.654Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lp8ipoeJ5HGBNC3mmUKxlA.png" /></figure><p><strong>Introduction</strong></p><p>Spring Boot provides Health Indicators to monitor application health and database health with the help of Spring Boot Actuator. Spring Boot Actuator comes with various Health Indicators for most of the relational databases and non-relational databases like MongoDB, Redis, ElasticSearch etc. Spring Boot Actuator also provides health indicators for RabbitMQ, IBM MQ out of the box.</p><p><strong>Why to go for Custom Health Checks</strong></p><p>If we want to monitor health status of external services our application connects to, Spring Boot doesn’t provide any health indicators for this scenario out of the box, we need to write custom health indicators. Also Spring Boot doesn’t provide any kafka health indicator out of the box as of today, so in this scenario we need to go for custom health indicator.</p><p><strong>Implementation</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*Opdx8XrkrYU2gBEe8Vw6FQ.png" /><figcaption>project structure</figcaption></figure><p><strong>Main class</strong></p><pre>package com.lights5.services.orders.api;<br><br>import com.lights5.services.orders.api.config.EndpointsRegistry;<br>import org.springframework.beans.factory.annotation.Autowired;<br>import org.springframework.boot.SpringApplication;<br>import org.springframework.boot.autoconfigure.SpringBootApplication;<br><br>@SpringBootApplication<br>public class OrdersApiApplication {<br><br> @Autowired<br> private EndpointsRegistry endpointsRegistry;<br><br> public static void main(String[] args) {<br>  SpringApplication.run(OrdersApiApplication.class, args);<br> }<br>}</pre><p><strong>application.yml file</strong></p><pre>spring:<br>  application:<br>    name: orders-api<br>  kafka:<br>    producer:<br>      bootstrap-servers: localhost:9092<br>  data:<br>    mongodb:<br>      host: localhost<br>      port: 27017<br>      database: orders_db<br>      username: ${username}<br>      password: ${pwd}<br>      authentication-database: orders_db<br><br>app:<br>  client:<br>    payments-service:<br>      host: https://example.com<br>      paths:<br>        health-check: /mock-service/health<br>        intiate-payment: /payments</pre><p><strong>ApplicationConfig</strong></p><pre>package com.lights5.services.orders.api.config;<br><br>import org.apache.kafka.clients.admin.AdminClient;<br>import org.springframework.boot.actuate.data.mongo.MongoHealthIndicator;<br>import org.springframework.boot.autoconfigure.kafka.KafkaProperties;<br>import org.springframework.context.annotation.Bean;<br>import org.springframework.context.annotation.Configuration;<br>import org.springframework.data.mongodb.core.MongoTemplate;<br><br>import java.util.Properties;<br><br>@Configuration<br>public class AppConfig {<br><br>    @Bean<br>    MongoHealthIndicator mongoHealthIndicator(MongoTemplate mongoTemplate) {<br><br>        return new CustomMongoHealthIndicator(mongoTemplate);<br>    }<br><br>    @Bean<br>    AdminClient kafkaAdminClient(KafkaProperties kafkaProperties) {<br><br>        Properties properties = new Properties();<br>        properties.put(&quot;bootstrap.servers&quot;, kafkaProperties.getBootstrapServers());<br>        properties.put(&quot;request.timeout.ms&quot;, 3000);<br>        properties.put(&quot;connections.max.idle.ms&quot;, 5000);<br>        return AdminClient.create(properties);<br>    }<br>}</pre><p><strong>EndpointsRegistry</strong></p><p>This class registers all external clients that application connects to.</p><pre>package com.lights5.services.orders.api.config;<br><br>import lombok.Getter;<br>import lombok.Setter;<br>import org.springframework.boot.context.properties.ConfigurationProperties;<br>import org.springframework.context.annotation.Configuration;<br><br>import java.util.Map;<br><br>@Getter<br>@Setter<br>@Configuration<br>@ConfigurationProperties(prefix = &quot;app&quot;)<br>public class EndpointsRegistry {<br><br>    private Map&lt;String, ServiceEndpoint&gt; client;<br><br>    @Getter<br>    @Setter<br>    static class ServiceEndpoint {<br><br>        private String host;<br>        private Map&lt;String, String&gt; paths;<br>    }<br><br>    public String getHealthCheckURL(String serviceName) {<br>        ServiceEndpoint endpoint = this.client.get(serviceName);<br>        if (endpoint != null) {<br>            String healthCheckPath = endpoint.getPaths().get(&quot;health-check&quot;);<br>            String host = endpoint.getHost();<br><br>            return host + healthCheckPath;<br>        }<br>        return null;<br>    }<br>}</pre><p><strong>PaymentServiceMonitor (External Client)</strong></p><p>This class overrides the default behaviour of AbstractHealthIndicator class. It executes GET request on health check url of external client and updates the status accordingly.</p><pre>package com.lights5.services.orders.api.config;<br><br>import lombok.RequiredArgsConstructor;<br>import lombok.extern.slf4j.Slf4j;<br>import org.apache.hc.client5.http.classic.methods.HttpGet;<br>import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;<br>import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;<br>import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;<br>import org.springframework.boot.actuate.health.AbstractHealthIndicator;<br>import org.springframework.boot.actuate.health.Health;<br>import org.springframework.stereotype.Component;<br><br>import java.io.IOException;<br><br>@Slf4j<br>@Component<br>@RequiredArgsConstructor<br>public class PaymentServiceHealthIndicator extends AbstractHealthIndicator {<br><br>    private final EndpointsRegistry endpointsRegistry;<br><br>    @Override<br>    protected void doHealthCheck(Health.Builder builder) {<br>        try {<br>            String healthCheckURL = endpointsRegistry.getHealthCheckURL(&quot;payment-service&quot;);<br>            CloseableHttpClient httpClient = HttpClientBuilder.create().build();<br><br>            CloseableHttpResponse response = httpClient.execute(new HttpGet(healthCheckURL));<br>            if (response.getCode() &gt;= 500) {<br>                log.error(&quot;Payment Service is down&quot;);<br>            }<br>            else {<br>                builder.up();<br>            }<br>        } catch (IOException ex) {<br>            builder.down();<br>        }<br>    }<br>}</pre><p><strong>HostAvailability Class</strong></p><p>This class is used to verify whether application is able to connect to given host and port number.</p><pre>package com.lights5.services.orders.api.service;<br><br>import lombok.extern.slf4j.Slf4j;<br><br>import java.io.IOException;<br>import java.net.*;<br><br>@Slf4j<br>public class HostAvailability {<br><br>    private HostAvailability() {<br>        // to prevent instantiation from other classes.<br>    }<br><br>    public static boolean isAvailable(String hostName, int port) {<br>        SocketAddress socketAddress = new InetSocketAddress(hostName, port);<br><br>        try (Socket socket = new Socket()) {<br><br>            socket.connect(socketAddress, 5000);<br>        } catch (IOException e) {<br><br>            log.error(&quot;Application Health Check Failed due to service unavailability {}&quot;, e.getMessage());<br>            return false;<br>        }<br>        return true;<br>    }<br>}</pre><p><strong>CustomMongoHealthIndicator</strong></p><p>This class extends the MongoHealthIndicator (provided by spring boot) and oveerides the behaviour of health check method. First we are verifying whether app is able to connect to host and port and then we are executing small command on database to check database connectivity. If we execute command directly without verifying server connectivity, it takes more time if server is not reachable from application. That’s why we are verifying server connectivity first.</p><pre>package com.lights5.services.orders.api.config;<br><br>import com.lights5.services.orders.api.service.HostAvailability;<br>import lombok.extern.slf4j.Slf4j;<br>import org.bson.Document;<br>import org.springframework.beans.factory.annotation.Value;<br>import org.springframework.boot.actuate.data.mongo.MongoHealthIndicator;<br>import org.springframework.boot.actuate.health.Health;<br>import org.springframework.data.mongodb.core.MongoTemplate;<br><br>@Slf4j<br>public class CustomMongoHealthIndicator extends MongoHealthIndicator {<br><br>    private final MongoTemplate mongoTemplate;<br><br>    @Value(&quot;${spring.data.mongodb.host}&quot;)<br>    private String mongodbHost;<br><br>    @Value(&quot;${spring.data.mongodb.port}&quot;)<br>    private int port;<br><br>    public CustomMongoHealthIndicator(MongoTemplate mongoTemplate) {<br>        super(mongoTemplate);<br>        this.mongoTemplate = mongoTemplate;<br>    }<br><br>    public void doHealthCheck(Health.Builder builder) throws Exception {<br>        boolean isServerAvailable = HostAvailability.isAvailable(mongodbHost, port);<br>        if (isServerAvailable) {<br>            Document result = mongoTemplate.executeCommand(&quot;{ isMaster: 1 }&quot;);<br>            builder.up().withDetail(&quot;maxWireVersion&quot;, result.getInteger(&quot;maxWireVersion&quot;));<br>        }<br>        else {<br>            log.error(&quot;MongoDB Server is down.&quot;);<br>            builder.down();<br>        }<br>    }<br>}</pre><p><strong>KafkaHealthIndicator</strong></p><p>This class provides implementation to verify kafka cluster health. It uses KafkaAdminClient to describe the cluster, if get the response then cluster is up else cluster is down.</p><p>Note: Doesn’t work if producer is configured to support transactions.</p><pre>package com.lights5.services.orders.api.config;<br><br>import lombok.RequiredArgsConstructor;<br>import lombok.extern.slf4j.Slf4j;<br>import org.apache.kafka.clients.admin.AdminClient;<br>import org.apache.kafka.common.Node;<br>import org.springframework.boot.actuate.health.AbstractHealthIndicator;<br>import org.springframework.boot.actuate.health.Health;<br>import org.springframework.stereotype.Component;<br><br>import java.util.Collection;<br>import java.util.concurrent.TimeUnit;<br><br>@Slf4j<br>@Component<br>@RequiredArgsConstructor<br>public class KafkaHealthIndicator extends AbstractHealthIndicator {<br><br>    private final AdminClient kafkaAdminClient;<br><br>    @Override<br>    protected void doHealthCheck(Health.Builder builder) throws Exception {<br><br>        Collection&lt;Node&gt; nodes = kafkaAdminClient.describeCluster()<br>                .nodes().get(3, TimeUnit.SECONDS);<br><br>        if (!nodes.isEmpty()) {<br>            log.error(&quot;Kafka Server is up with nodes {}&quot;, nodes.size());<br>            builder.up();<br>        }<br>        else {<br>            log.error(&quot;Kafka Server is down&quot;);<br>            builder.down();<br>        }<br>    }<br>}</pre><p><strong>Working</strong></p><p>If any of these HealthIndicators (MongoDB, Kafka, Payments Service) is down, then health check url of application returns status as</p><pre>{<br>  &quot;status&quot;: &quot;DOWN&quot;<br>}</pre><p>If all these dependent services are up, then the status will be returned as</p><pre>{<br>  &quot;status&quot;: &quot;UP&quot;<br>}</pre><p>Endpoint to verify app health: <a href="http://localhost:8080/actuator/health">http://localhost:8080/actuator/health</a></p><p><strong>Conclusion</strong></p><p>Custom Health Checks are important as it provides greater visibility of external services availability. We can take action immediately there by decreasing application errors.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2763d0bcd07a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/backend-with-spring-boot/custom-health-indicators-in-spring-boot-2763d0bcd07a">Custom Health Indicators in Spring Boot</a> was originally published in <a href="https://medium.com/backend-with-spring-boot">backend with spring boot</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Kafka Producer with Spring Boot]]></title>
            <link>https://medium.com/kafka-with-spring/apache-kafka-with-spring-boot-2cbf16eda41a?source=rss-c83be30e0ccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cbf16eda41a</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[messaing-systems]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[kafka-producer]]></category>
            <category><![CDATA[apache-kafka]]></category>
            <dc:creator><![CDATA[Krishna]]></dc:creator>
            <pubDate>Thu, 06 Jun 2024 13:10:27 GMT</pubDate>
            <atom:updated>2024-06-18T17:26:31.184Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*M54tyZGX2SOhXyEtrEOX7w.png" /></figure><p>In this artcile I am going to show you how to build Message Publisher using Apache Kafka and Spring Boot. First we will see what is Apache Kafka.</p><p>Apache Kafka is an open-source, distributed streaming platform designed for real-time event processing. It provides a reliable, scalable, and fault-tolerant way to handle large volumes of data streams. Kafka allows you to publish and subscribe to data topics, making it ideal for building event-driven applications, log aggregation, and data pipelines.</p><p><strong>Prerequisites:</strong></p><p>Apache Kafka</p><p>Java</p><p>Apache Maven</p><p>Any IDE (Intellij or STS or Eclipse)</p><p><strong>Project Structure:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*7e28XAo3MCrz9-sWCFk-cg.png" /></figure><p>In this project we will expose endpoint to create user and we will publish UserCreatedEvent to Kafka Topic.</p><p><strong>application.yml file</strong></p><pre>spring:<br>  application:<br>    name: message-publisher<br><br>  kafka:<br>    producer:<br>      bootstrap-servers: localhost:9092<br>      key-serializer: org.apache.kafka.common.serialization.StringSerializer<br>      value-serializer: org.springframework.kafka.support.serializer.JsonSerializer<br><br>app:<br>  topic_name: users-topic<br><br>server:<br>  port: 8089</pre><p><em>spring.application.name</em> is used to define the application name.</p><p><em>bootstrap-servers</em> specifies the hostname and port number of kafka.</p><p>serializer specifies which serializer needs to be used to convert java object to bytes before sending it to kafka. Based on key type we can use StringSerializer or IntegerSerializer.</p><p>(Example: org.apache.kafka.common.serialization.StringSerializer)</p><p><em>key-serializer</em> is used in a scenario when same keys should go to same partition.</p><p><em>value-serializer</em> specifies the which serializer needs to be used to convert java object to bytes before sending kafka. If we are using custom java class as value, then we can use JSONSerializer as value-serializer.</p><p><strong>pom.xml</strong></p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;<br> xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;<br> &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br> &lt;parent&gt;<br>  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>  &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;<br>  &lt;version&gt;3.3.0&lt;/version&gt;<br>  &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;<br> &lt;/parent&gt;<br> &lt;groupId&gt;com.lights5.com&lt;/groupId&gt;<br> &lt;artifactId&gt;message-publisher&lt;/artifactId&gt;<br> &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;<br> &lt;name&gt;message-publisher&lt;/name&gt;<br> &lt;description&gt;Demo project for Kafka Producer using Spring Boot&lt;/description&gt;<br> &lt;properties&gt;<br>  &lt;java.version&gt;17&lt;/java.version&gt;<br> &lt;/properties&gt;<br> &lt;dependencies&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>   &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.springframework.kafka&lt;/groupId&gt;<br>   &lt;artifactId&gt;spring-kafka&lt;/artifactId&gt;<br>  &lt;/dependency&gt;<br><br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;<br>   &lt;artifactId&gt;lombok&lt;/artifactId&gt;<br>   &lt;optional&gt;true&lt;/optional&gt;<br>  &lt;/dependency&gt;<br> &lt;/dependencies&gt;<br><br> &lt;build&gt;<br>  &lt;plugins&gt;<br>   &lt;plugin&gt;<br>    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>    &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;<br>    &lt;configuration&gt;<br>     &lt;excludes&gt;<br>      &lt;exclude&gt;<br>       &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;<br>       &lt;artifactId&gt;lombok&lt;/artifactId&gt;<br>      &lt;/exclude&gt;<br>     &lt;/excludes&gt;<br>    &lt;/configuration&gt;<br>   &lt;/plugin&gt;<br>  &lt;/plugins&gt;<br> &lt;/build&gt;<br><br>&lt;/project&gt;</pre><p><em>spring web, spring kafka</em> are required dependencies.</p><p><strong>ApplicationConfiguration class</strong></p><pre>package com.lights5.com.message.publisher;<br><br>import lombok.Getter;<br>import lombok.Setter;<br>import org.springframework.boot.context.properties.ConfigurationProperties;<br>import org.springframework.context.annotation.Configuration;<br><br>@Getter<br>@Setter<br>@Configuration<br>@ConfigurationProperties(prefix = &quot;app&quot;)<br>public class AppConfig {<br><br>    private String topicName;<br>}</pre><p>This class is used to bind configuration values from application.yml file to the respective fields.</p><p><strong>Application class</strong></p><pre>package com.lights5.com.message.publisher;<br><br>import lombok.RequiredArgsConstructor;<br>import org.apache.kafka.clients.admin.NewTopic;<br>import org.springframework.boot.SpringApplication;<br>import org.springframework.boot.autoconfigure.SpringBootApplication;<br>import org.springframework.context.annotation.Bean;<br>import org.springframework.kafka.config.TopicBuilder;<br><br>@SpringBootApplication<br>@RequiredArgsConstructor<br>public class Application {<br><br> private final AppConfig appConfig;<br><br> public static void main(String[] args) {<br>  SpringApplication.run(Application.class, args);<br> }<br><br> @Bean<br> NewTopic usersTopic() {<br><br>  return TopicBuilder.name(appConfig.getTopicName())<br>    .partitions(3)<br>    .replicas(2)<br>    .build();<br> }<br>}</pre><p>NewTopic Bean is used to create topic if topic doesn’t exist already on kafka broker. We can configure required number of partitions and replicas as we need.</p><p><strong>Model Classes</strong></p><p>User class</p><pre>package com.lights5.com.message.publisher;<br><br>import java.time.LocalDateTime;<br><br>record User (<br>        String firstName,<br>        String lastName,<br>        String email,<br>        Long phoneNumber,<br>        Address address,<br>        LocalDateTime createdAt) {<br><br>    record Address (<br>            String city,<br>            String country,<br>            String zipcode) {<br><br>    }<br>}</pre><p>EventType enum</p><pre>package com.lights5.com.message.publisher;<br><br>enum EventType {<br><br>    USER_CREATED_EVENT;<br>}</pre><p>EventPayload class</p><pre>package com.lights5.com.message.publisher;<br><br>record EventPayload (<br>        EventType eventType,<br>        String payload) {<br><br>}</pre><p><strong>Endpoint to Create User (UserController class)</strong></p><pre>package com.lights5.com.message.publisher;<br><br>import lombok.RequiredArgsConstructor;<br>import org.springframework.http.HttpStatus;<br>import org.springframework.web.bind.annotation.*;<br><br>import static com.lights5.com.message.publisher.EventType.USER_CREATED_EVENT;<br><br>@RestController<br>@RequiredArgsConstructor<br>@RequestMapping(&quot;/v1/users&quot;)<br>class UsersController {<br><br>    private final UsersService usersService;<br><br>    @PostMapping<br>    @ResponseStatus(HttpStatus.CREATED)<br>    public void createUser(@RequestBody User user) {<br><br>        usersService.publishMessage(user, USER_CREATED_EVENT);<br>    }<br>}</pre><p>UsersController class exposes POST method to create user, which inturn calls method in UsersService class.</p><p><strong>UsersService class</strong></p><pre>package com.lights5.com.message.publisher;<br><br>import com.fasterxml.jackson.core.JsonProcessingException;<br>import com.fasterxml.jackson.databind.ObjectMapper;<br>import lombok.RequiredArgsConstructor;<br>import lombok.extern.slf4j.Slf4j;<br>import org.apache.kafka.common.serialization.StringSerializer;<br>import org.springframework.kafka.core.KafkaTemplate;<br>import org.springframework.stereotype.Service;<br><br>@Slf4j<br>@Service<br>@RequiredArgsConstructor<br>class UsersService {<br><br>    private final AppConfig appConfig;<br>    private final ObjectMapper objectMapper;<br>    private final KafkaTemplate&lt;String, EventPayload&gt; kafkaTemplate;<br><br>    public void publishMessage(User user, EventType eventType) {<br><br>        try {<br><br>            var userCreatedEventPayload = objectMapper.writeValueAsString(user);<br>            var eventPayload = new EventPayload(eventType, userCreatedEventPayload);<br>            kafkaTemplate.send(appConfig.getTopicName(), eventPayload);<br>        }<br>        catch (JsonProcessingException ex) {<br><br>            log.error(&quot;Exception occurred in processing JSON {}&quot;, ex.getMessage());<br>        }<br>    }<br>}</pre><p>KafkaTemplate is used to send messages to kafka. Spring Boot autoconfigues KafkaTemplate and injected to required class.</p><p>KafkaTemplate&lt;K, V&gt; is of this form. Here K is key type and V is value type.</p><p>In our case key is String type and V is EventPayload class type. So we need to use StringSerializer for key and JsonSerializer (EventPayload is custom java class type) for values.</p><p>kafkaTemplate.send() method takes topicName as 1st parameter and data to be published as 2nd argument.</p><p><strong>Running Kafka in local:</strong></p><p>To run this application in local, first we need to run kafka in local and then start spring boot application.</p><p>Please use this docker-compose file to run kafka in local.</p><pre>version: &#39;2.1&#39;<br><br>services:<br>  zoo1:<br>    image: confluentinc/cp-zookeeper:7.3.2<br>    hostname: zoo1<br>    container_name: zoo1<br>    ports:<br>      - &quot;2181:2181&quot;<br>    environment:<br>      ZOOKEEPER_CLIENT_PORT: 2181<br>      ZOOKEEPER_SERVER_ID: 1<br>      ZOOKEEPER_SERVERS: zoo1:2888:3888<br><br><br>  kafka1:<br>    image: confluentinc/cp-kafka:7.3.2<br>    hostname: kafka1<br>    container_name: kafka1<br>    ports:<br>      - &quot;9092:9092&quot;<br>      - &quot;29092:29092&quot;<br>    environment:<br>      KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka1:19092,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092,DOCKER://host.docker.internal:29092<br>      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,DOCKER:PLAINTEXT<br>      KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL<br>      KAFKA_ZOOKEEPER_CONNECT: &quot;zoo1:2181&quot;<br>      KAFKA_BROKER_ID: 5<br>      KAFKA_LOG4J_LOGGERS: &quot;kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO&quot;<br>    depends_on:<br>      - zoo1<br><br>  kafka2:<br>    image: confluentinc/cp-kafka:7.3.2<br>    hostname: kafka2<br>    container_name: kafka2<br>    ports:<br>      - &quot;9093:9093&quot;<br>      - &quot;29093:29093&quot;<br>    environment:<br>      KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka2:19093,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9093,DOCKER://host.docker.internal:29093<br>      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,DOCKER:PLAINTEXT<br>      KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL<br>      KAFKA_ZOOKEEPER_CONNECT: &quot;zoo1:2181&quot;<br>      KAFKA_BROKER_ID: 6<br>      KAFKA_LOG4J_LOGGERS: &quot;kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO&quot;<br>    depends_on:<br>      - zoo1<br><br><br>  kafka3:<br>    image: confluentinc/cp-kafka:7.3.2<br>    hostname: kafka3<br>    container_name: kafka3<br>    ports:<br>      - &quot;9094:9094&quot;<br>      - &quot;29094:29094&quot;<br>    environment:<br>      KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka3:19094,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9094,DOCKER://host.docker.internal:29094<br>      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,DOCKER:PLAINTEXT<br>      KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL<br>      KAFKA_ZOOKEEPER_CONNECT: &quot;zoo1:2181&quot;<br>      KAFKA_BROKER_ID: 7<br>      KAFKA_LOG4J_LOGGERS: &quot;kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO&quot;<br>    depends_on:<br>      - zoo1</pre><pre>docker-compose -f up .</pre><p>The above command start the kafka in local.</p><p><strong>Testing using Postman:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SKVm_Avc-rjoJmeVLd2ljw.png" /></figure><p>Endpoint: <a href="http://localhost:8089/v1/users">http://localhost:8089/v1/users</a> ( POST method )</p><p>Payload:</p><pre>{<br>    &quot;firstName&quot;: &quot;John&quot;,<br>    &quot;lastName&quot;: &quot;Albert&quot;,<br>    &quot;email&quot;: &quot;johnalbert@gmail.com&quot;,<br>    &quot;phoneNumber&quot;: &quot;9999999999&quot;,<br>    &quot;address&quot;: {<br>        &quot;city&quot;: &quot;NewYork&quot;,<br>        &quot;country&quot;: &quot;USA&quot;,<br>        &quot;zipcode&quot;: &quot;111111&quot;<br>    },<br>    &quot;createdAt&quot;: &quot;2024-06-06T16:46:00&quot;<br>}</pre><p>You can verify using kafka-console-consumer command whether the data is published or not.</p><p>Github link: <a href="https://github.com/saikrishnasaski/message-publisher">https://github.com/saikrishnasaski/message-publisher</a></p><p><strong>Conclusion</strong></p><p>Spring Boot provides easy integration with kafka, helps us in creating pub sub model applications easily with minimal configurations. We can develop Microservices event driven application easily with Spring Boot and Kafka.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cbf16eda41a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kafka-with-spring/apache-kafka-with-spring-boot-2cbf16eda41a">Building Kafka Producer with Spring Boot</a> was originally published in <a href="https://medium.com/kafka-with-spring">kafka with spring</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Github actions for compiling Spring Boot App to Native Image]]></title>
            <link>https://medium.com/@saikrishnasaski/github-actions-for-compiling-spring-boot-app-to-native-image-2584ca57a1f4?source=rss-c83be30e0ccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/2584ca57a1f4</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[graalvm-native-image]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[graalvm]]></category>
            <dc:creator><![CDATA[Krishna]]></dc:creator>
            <pubDate>Tue, 24 Jan 2023 04:04:07 GMT</pubDate>
            <atom:updated>2024-06-07T04:10:37.888Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*okkHsLoaTbjR4btE.png" /></figure><blockquote><strong>Our usual way of working with Java Applications.</strong></blockquote><p>Usually when we compile java apps with JDK, we get byte code (you can say .class files compressed together into one fat jar file). You need Java runtime to execute this byte code on the target machine. This has some limitations such as higher memory footprints and higher application start up times. In cloud native environments, we need lower application start up times.</p><blockquote><strong>What is Native Image and How it makes things easy for Java apps to run on cloud environments?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ru5MlxK4DR33cCKr.png" /></figure><p>Recently Oracle introduced GraalVM compiler to compile Java code directly to machine code ( Native Image ). This native image includes application classes, dependency classes and runtime library classes, and statically linked native code from JDK. So you don’t need Java runtime on the target machine. This results in lower memory usage and faster application startups.</p><p>I will guide you on how to write Github actions which compiles Java app to native image and builds Docker image out of it and pushes the image to Docker Hub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*fyx0wNY81vsmQQyEBRhcUQ.png" /><figcaption>Project Structure</figcaption></figure><blockquote>Github Actions workflow configuration</blockquote><p>We need to add our configuration file under <a href="https://github.com/LightsFive/lights5.order-service/tree/main/.github/workflows">.github/workflows</a>.</p><pre>on:<br>  push:<br>    branches: [ main ]<br>  pull_request:<br>    branches: [ main ]<br>  workflow_dispatch:<br>    inputs:<br>      environment:<br>        description: &#39;env&#39;<br>        required: true<br>        default: &#39;dev&#39;<br>      branch:<br>        description: &#39;branch&#39;<br>        required: true<br>        default: &#39;main&#39;<br><br>name: Deploy<br><br>jobs:<br>  deploy:<br>    name: Deploy<br>    runs-on: ubuntu-latest<br>    env:<br>      RUN_ID: ${{ github.run_id }}<br>      environment: ${{ github.event.inputs.environment || &#39;dev&#39; }}<br>      REPO_NAME: &#39;lights5.orders-service&#39;<br><br>    steps:<br>        # checkout<br>      - name: Check out repository code<br>        uses: actions/checkout@v3<br>        <br>      - name: Set JAVA Version<br>        uses: graalvm/setup-graalvm@v1<br>        with:<br>          version: &#39;22.3.0&#39;<br>          java-version: &#39;19&#39;<br>          components: &#39;native-image&#39;<br>          run: |<br>            echo &quot;GRAALVM_HOME: $GRAALVM_HOME&quot;<br>            echo &quot;JAVA_HOME: $JAVA_HOME&quot;<br>            java --version<br>            gu --version<br>            native-image --version<br>      - name: JAVA Version<br>        run: java -version<br><br>      - name: Compile &amp; Build Native Executable<br>        run: mvn -DskipTests -Pnative native:compile<br><br>      - name: Build, tag, and push the image to Docker Hub<br>        id: build-image<br>        env:<br>          DOCKER_USER: ${{ secrets.DOCKER_USER }}<br>          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}<br><br>        run: |<br>          # Build a docker container and push it to DockerHub<br>          docker login -u $DOCKER_USER -p $DOCKER_PASSWORD<br>          mvn spring-boot:build-image<br>          echo &quot;Pushing image to Docker Hub...&quot;<br>          docker push $DOCKER_USER/${{ github.repository }}:${{ env.environment }}-${{ env.RUN_ID }}</pre><ol><li>This workflow triggers on push or any pull request to main branch.</li><li>Inputs can be taken from user which is declared under workflow_dispatch.</li><li>Next we need to define Job name and where it needs to run. I am using ubuntu-latest.</li><li>Next we checkout the code using actions/checkout@v3</li><li>Next we download and setup java version using graalvm/setup-graalvm@v1</li><li>Next we are compiling source code to native using maven command ( mvn -DskipTests -Pnative native:compile )</li><li>The above command gives the native image in target folder.</li><li>Next we will login to Docker Hub and builds the Docker Image and pushes Docker Image to Docker Hub.</li></ol><pre>docker login -u $DOCKER_USER -p $DOCKER_PASSWORD</pre><p>Above command logins to Docker Hub.</p><pre>mvn spring-boot:build-image</pre><p>Above command build Docker Image using Dockerfile present in project root directory.</p><p><a href="https://github.com/LightsFive/lights5.order-service/blob/main/Dockerfile">Dockerfile</a> ( Since Native Image is compiled using Linux distro ubuntu, we need to use Linux distro ubuntu only in Dockerfile as well). <strong>Native Image is platform dependent.</strong></p><pre>FROM ubuntu:20.04<br><br>ARG APP_FILE<br>EXPOSE 8080<br><br>COPY ${APP_FILE} target/lights5.orders-service<br>ENTRYPOINT [&quot;/lights5.orders-service&quot;]</pre><pre>docker push $DOCKER_USER/${{ github.repository }}:${{ env.environment }}-${{ env.RUN_ID }}</pre><p>Above command pushes Docker image to Docker Hub.</p><blockquote><strong>Github Repository Reference</strong></blockquote><p><a href="https://github.com/LightsFive/lights5.order-service">GitHub - LightsFive/lights5.order-service</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2584ca57a1f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run Docker on Android]]></title>
            <link>https://medium.com/android-tweaks/how-to-run-docker-on-android-80b9ad352f2d?source=rss-c83be30e0ccc------2</link>
            <guid isPermaLink="false">https://medium.com/p/80b9ad352f2d</guid>
            <category><![CDATA[run-docker-in-termux]]></category>
            <category><![CDATA[run-docker-in-android]]></category>
            <category><![CDATA[how-to-run-docker]]></category>
            <dc:creator><![CDATA[Krishna]]></dc:creator>
            <pubDate>Sat, 03 Sep 2022 06:19:04 GMT</pubDate>
            <atom:updated>2024-06-12T14:57:05.836Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*pRVBiQFosSlsVJoeLEQ5EA.png" /></figure><p><strong>Why Android doesn’t support Docker natively</strong></p><p>Docker runs on all Linux distributions. You might be wondering though Android uses Linux kernel, then why Android doesn’t support Docker natively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y-mutCaaVr3_sUXqyLv_6Q.jpeg" /></figure><p>Android Kernel is a subset of Linux Kernel. Android kernel lacks few features which Docker requires. For example Android doesn’t have Namespaces and Cgroups. Namespaces are required for system resources isolation and Cgroups are required for fine grained control of these limits on resources. But Docker Containers runs as separate process, So Docker requires namespaces and cgroups in the kernel. That’s why you cannot run Docker in Android natively.</p><p><strong>Running Docker in Android using QEMU</strong></p><p>QEMU is nothing but Quick Emulator, which is used to run guest operating system. So we are going to install Alpine linux based distro in Android.</p><p>Steps to install in Termux :-</p><ol><li>Install Termux apk from playstore.</li><li>Install QEMU in android. Run the below command in Termux app</li></ol><pre>pkg install qemu-utils qemu-common qemu-system-x86_64-headless</pre><p>3. Download Alpine Linux 3.12 (virt optimized) ISO</p><pre>mkdir alpine &amp;&amp; cd $_<br> wget http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/x86_64/alpine-virt-3.12.3-x86_64.iso</pre><p>4. Create disk (might take upto 500 MB)</p><pre>qemu-img create -f qcow2 alpine.img 4G</pre><p>5. Boot it up</p><pre>qemu-system-x86_64 -machine q35 -m 1024 -smp cpus=2 -cpu qemu64 \<br>  -drive if=pflash,format=raw,read-only,file=$PREFIX/share/qemu/edk2-x86_64-code.fd \<br>  -netdev user,id=n1,hostfwd=tcp::2222-:22 -device virtio-net,netdev=n1 \<br>  -cdrom alpine-virt-3.12.3-x86_64.iso \<br>  -nographic alpine.img</pre><p>6. Login with user root (no password)</p><p>7. Setup network (press Enter to use defaults):</p><pre>localhost:~# setup-interfaces<br> Available interfaces are: eth0.<br> Enter &#39;?&#39; for help on bridges, bonding and vlans.<br> Which one do you want to initialize? (or &#39;?&#39; or &#39;done&#39;) [eth0] <br> Ip address for eth0? (or &#39;dhcp&#39;, &#39;none&#39;, &#39;?&#39;) [dhcp] <br> Do you want to do any manual network configuration? [no] <br> localhost:~# ifup eth0</pre><p>8. Create an answerfile to speed up installation:</p><pre>localhost:~# wget <a href="https://gist.githubusercontent.com/saikrishnasaski/8c81cb04c27d0eaa994b5b5290f7718e/raw/answerfile">https://github.com/saikrishnasaski/answerfile/blob/main/answerfile</a></pre><p>9. Patch setup-disk to enable serial console output on boot</p><pre>localhost:~# sed -i -E &#39;s/(local kernel_opts)=.*/\1=&quot;console=ttyS0&quot;/&#39; /sbin/setup-disk</pre><p>10. Run setup to install to disk</p><pre>localhost:~# setup-alpine -f answerfile</pre><p>11. Once installation is complete, power off the VM (command poweroff) and boot again without cdrom:</p><pre>qemu-system-x86_64 -machine q35 -m 1024 -smp cpus=2 -cpu qemu64 \<br>  -drive if=pflash,format=raw,read-only,file=$PREFIX/share/qemu/edk2-x86_64-code.fd \<br>  -netdev user,id=n1,hostfwd=tcp::2222-:22 -device virtio-net,netdev=n1 \<br>  -nographic alpine.img</pre><p>12. Install docker and enable on boot:</p><pre>apk update &amp;&amp; apk add docker<br>service docker start<br>rc-update add docker</pre><p>13. Useful keys:</p><ul><li>Ctrl+a x: quit emulation</li><li>Ctrl+a h: toggle QEMU console</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80b9ad352f2d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/android-tweaks/how-to-run-docker-on-android-80b9ad352f2d">How to run Docker on Android</a> was originally published in <a href="https://medium.com/android-tweaks">Android Tweaks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>