<?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 Anant on Medium]]></title>
        <description><![CDATA[Stories by Anant on Medium]]></description>
        <link>https://medium.com/@anantc?source=rss-316c6f50a588------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*kgP_I4Yg42MYuR_O.jpeg</url>
            <title>Stories by Anant on Medium</title>
            <link>https://medium.com/@anantc?source=rss-316c6f50a588------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 13:27:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anantc/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[Visibility in Message Queues]]></title>
            <link>https://medium.com/@anantc/visibility-in-message-queues-52d93dc1f772?source=rss-316c6f50a588------2</link>
            <guid isPermaLink="false">https://medium.com/p/52d93dc1f772</guid>
            <category><![CDATA[sqs]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <dc:creator><![CDATA[Anant]]></dc:creator>
            <pubDate>Thu, 02 Nov 2023 17:23:01 GMT</pubDate>
            <atom:updated>2023-11-02T17:23:01.233Z</atom:updated>
            <content:encoded><![CDATA[<p>Message visibility in a message queue refers to the concept of how long a message is available for processing by a consumer after it has been placed in the queue but before it becomes eligible for reprocessing or removal. Message queues are often used in distributed systems and asynchronous communication to decouple producers and consumers of messages, allowing for more scalable and reliable systems. Visibility management is an essential aspect of message queue systems to ensure that messages are processed correctly and efficiently.</p><p>While not all message queues have the concept of a visibility timeout, popular message queues such as AWS SQS and RabbitMQ do have a notion of visibility timeout.</p><p>In this blog, we look at AWS SQS in particular.</p><p><strong>What is Visibility Timeout ?</strong></p><p>In simple words — when a message is received from an SQS queue by a consumer, it becomes invisible to other consumers for the duration of the <em>visibility timeout</em>.</p><p>This ensures that a message is only processed by one consumer at a time, preventing multiple consumers from processing the same message simultaneously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/0*bVjf4agKtatt6AtS.png" /></figure><p>(As presented in the <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html">AWS SQS developer guide</a>)</p><p><strong>How is visibility timeout used ?</strong></p><p>During the visibility timeout, a consumer processes a message. If the processing is successful, the consumer should delete the message from the queue to remove it permanently. If the processing fails, the consumer can allow the visibility timeout to expire, and the message becomes visible to other consumers again.</p><p><strong>What about visibility timeout and idempotency ?</strong></p><p>Visibility timeout doesn’t ensure idempotency. There may be cases where a message is delivered multiple times even if our visibility timeout is large enough. Hence, if we do not have a guarantee of exactly once delivery and processing — we must keep this in mind while designing our system.</p><p><strong>Setting Visibility timeout</strong></p><p>1) <em>Default</em>: AWS SQS has a default visibility timeout of 30s for each message queue. This is configurable through the AWS console itself. This would apply to every message in the queue</p><p>2) <em>For a particular message</em>: Message visibility can also be changed specifically for a message in a queue. Here’s a code snippet that illustrates how one can do this (this uses <a href="https://github.com/boto/boto">Boto</a> in Python) :</p><pre><br>import boto3<br># Initialize the SQS client<br>sqs = boto3.client(&#39;sqs&#39;, region_name=&#39;your-region&#39;)<br># Specify the URL of the SQS queue<br>queue_url = &#39;your-queue-url&#39;<br># Specify the message receipt handle and the new visibility timeout in seconds<br>message_receipt_handle = &#39;your-message-receipt-handle&#39;<br>new_visibility_timeout = 60  # Change to your desired visibility timeout in seconds<br># Change the visibility timeout of the message<br>sqs.change_message_visibility(<br>    QueueUrl=queue_url,<br>    ReceiptHandle=message_receipt_handle,<br>    VisibilityTimeout=new_visibility_timeout<br>)</pre><p><strong>Further Reading</strong></p><ol><li><a href="https://aws.amazon.com/sqs/">AWS SQS Homepage</a></li><li><a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html">AWS SQS Developer Guide</a></li><li><a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html#configuring-visibility-timeout">Visibility timeout in AWS SQS</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52d93dc1f772" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trust]]></title>
            <link>https://medium.com/@anantc/trust-a6ac8ddbbbdc?source=rss-316c6f50a588------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6ac8ddbbbdc</guid>
            <dc:creator><![CDATA[Anant]]></dc:creator>
            <pubDate>Sun, 16 Nov 2014 06:12:38 GMT</pubDate>
            <atom:updated>2014-11-16T06:13:47.940Z</atom:updated>
            <content:encoded><![CDATA[<p>Trust is something that we rarely give a chance to.</p><p>Most of us believe that the word trust is defined as</p><blockquote><strong>trust — </strong><em>n.</em><strong> </strong>Firm reliance on the integrity, ability, or character of a person or thing.</blockquote><p>However , if we try changing our definition of trust to not merely expecting a particular outcome , or a response out of a situation , something different happens.</p><p>The word “trusting” then , changes its meaning to something different. Something without the heavy word <strong><em>reliance. </em></strong>Reliance<em> </em>is something that screams of outcome dependency. Moreoever , since reliance biases our experience to a particular outcome , it in effect goes against our expected experience of “trusting”</p><p>So , it would rather make sense to alter the defintion to</p><blockquote><strong><em>trust — </em></strong>n. <em>Unconditional belief that providing freedom to act will bring out integrity, ability, or character of a person or thing.</em></blockquote><p>I’m not proposing that we trust every thing or person that comes around the block — no , that would be detrimental and unhealthy.</p><p>However , imagine if we started trusting each other a little bit more. And by each other I mean , every stranger you see on the street. Every stranger you meet at a bar , or every other person who doesn’t seem to be worthy of our previous definition of <strong><em>trust</em></strong>. Our interactions would change significantly — if only while testing the waters with every new person that we interact with.</p><p>I’d love it if we all could bit by bit start trusting each other’s actions , understanding that all actions — no matter what they are , have reasons behind them . Unconditional trust not biased towards a particular outcome can strengthen our relationships.</p><p>Trusting is freedom.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6ac8ddbbbdc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[People Are Good]]></title>
            <link>https://medium.com/@anantc/people-are-good-90c4f590b9cd?source=rss-316c6f50a588------2</link>
            <guid isPermaLink="false">https://medium.com/p/90c4f590b9cd</guid>
            <dc:creator><![CDATA[Anant]]></dc:creator>
            <pubDate>Fri, 07 Feb 2014 13:37:43 GMT</pubDate>
            <atom:updated>2014-06-30T06:18:06.207Z</atom:updated>
            <content:encoded><![CDATA[<h4>On misjudgements</h4><p>So often we judge people because of their actions. So very often we make snide remarks inside our heads that bit by bit start coloring up our opinions on a person .<br>Someone didn&#39;t take your call. Someone didn&#39;t reply to a text maybe ? And you&#39;re thinking - “Hmm , he / she must hate me”. Or even worse ,“ he / she is trying to ignore me” . We tend to color a person as black or white , good or bad. Whereas , in reality , they&#39;re all that&#39;s there in between.<br>I&#39;d urge you to look at reality with a little more depth. With a little more contemplated thought.<br>Ever imagined that the person who didn&#39;t return the call may have just run out of balance ? Or might have been asleep or really busy ?<br>Maybe they&#39;re trying to hide something thanks to the very fear of being judged ? ( Ah , full circle ?) Even worse - they may be having a terrible day. Who knows but them!<br>At the end of the day, we&#39;re all human. Its the same basic emotions that run through us all.<br>I guess judging is natural and is deeply ingrained into human behavior. But it has to be taken into perspective. All behavior is pretty simple cause and effect , just that the cause is often hidden from us and we end up conjuring our own causes that we think are appropriate. Most of the times they&#39;re negative - owing to our brain&#39;s negativity bias.<br>A show of compassion isn&#39;t seeing the world with rose tinted spectacles. Its seeing the world without any spectacles at all. It’s the real deal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90c4f590b9cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“We Leave it all Far Behind” — Into the Wild]]></title>
            <link>https://medium.com/@anantc/we-leave-it-all-far-behind-into-the-wild-daf34408226e?source=rss-316c6f50a588------2</link>
            <guid isPermaLink="false">https://medium.com/p/daf34408226e</guid>
            <dc:creator><![CDATA[Anant]]></dc:creator>
            <pubDate>Tue, 31 Dec 2013 11:27:23 GMT</pubDate>
            <atom:updated>2013-12-31T11:27:23.789Z</atom:updated>
            <content:encoded><![CDATA[<p>Scores of times , you’re always thinking -“What does that action of his or her’s mean ?”</p><p>“What’s going to happen next ?”</p><p>Its almost unconscious , all these worrisome ideas. It becomes habitual in nature. We think too much.</p><p>Live with abandon. Why ? Because it doesn’t matter. I almost hear you disagreeing with this statement , but if you go deeper , you might have an epiphany.</p><p>The illusion of control is huge. How many times have you overthought decisions ? The outcomes of which you probably had no or very little control over. It is precisely because we have no control over events that we should go big , and with abandon. If it goes your way , great. If it doesn’t — well you knew beforehand that there were millions of factors affecting the event.</p><p>Think about how fulfilling life might be , if you could just , one day at a time , start going for it. Without thinking for a second time , just start going for whatever you were holding back from. Going big , becomes easier as you excercise that “ Go Big” muscle.</p><p>Total abandon. Its freedom at its best.</p><iframe src="https://media.embed.ly/1/frame?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D8IgmwYFcRmI&amp;width=854&amp;secure=true&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;height=480" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6bf109c189756476d6567b237b832e39/href">https://medium.com/media/6bf109c189756476d6567b237b832e39/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=daf34408226e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On texting]]></title>
            <link>https://medium.com/@anantc/on-texting-5dc0b13d2a2a?source=rss-316c6f50a588------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dc0b13d2a2a</guid>
            <dc:creator><![CDATA[Anant]]></dc:creator>
            <pubDate>Sat, 21 Dec 2013 18:39:28 GMT</pubDate>
            <atom:updated>2014-02-19T15:02:20.438Z</atom:updated>
            <content:encoded><![CDATA[<h4>The compulsive world of instant messaging</h4><p>“Texting” — it’s a word that is unfortunately making big headway in our day. Soon , I reckon , it’ll be a part of the celebrated Oxford Dictionary ( Hope it isn’t already) . So what’s so bad about texting ? Nothing really . It really isn’t that bad — until you slowly and steadily become a slave to your phone. To sending people that one last text on the plethora of instant messaging clients that have flooded smartphones. To waiting for someone to reply to a text, to whipping your phone out at the slightest hint of discomfort in a social situation.<br>It really isn’t bad at all.</p><p>While I’m in no way asking you to fling your phone right into the dustbin — I am asking you to consider something that <em>might</em> be as startling to you. Consider spending a day without your phone. Just a day . One day at a time. Seems a bit rash ? Never-mind , consider simply switching your data connection on your phone ,off for a day.</p><p>The first <strong>symptoms </strong>if I may phrase it that way , will be something similar to a withdrawal symptom . Your mind goes “ I’m missing all those important texts!” But are they really that important ? The freedom that you get without having a mobile device that’s unfortunately smarter than you(hope not) constantly nagging you , is something that very few people from my generation have felt. Instead , just for a change, could you simply make a traditional call , and use your very well endowed vocal chords to relay information ? Your mind just reminded you that a call costs money .</p><p>Another clichéd fact that you may have come across is — more than half of what you communicate is done through non verbals. That is — what you say , doesn’t matter half as much as in the <strong><em>way </em></strong>you say it. A text message simply takes every non-verbal out of the equation ( leaving apart that favourite emoticon that you compulsively use) . I’ve had the misfortune ( fortune ? ) of seeing a mother <strong><em>scold , </em></strong>yes scold her child over WhatsApp. Needless to say , the scolding wasn’t very effective. All in all , that’s another huge reason to make that call if possible , instead of pouring your heart out over a few characters on your tiny keyboard.</p><p>I’d like to end by pointing you to a video that cuts straight to the matter and fantastically puts the point across in my opinion.</p><p>Sending or receiving a text every few seconds. Is it worth it ? Your Call.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FOINa46HeWg8%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DOINa46HeWg8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FOINa46HeWg8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9ca7f9df71eebf78b6918c7fbf177628/href">https://medium.com/media/9ca7f9df71eebf78b6918c7fbf177628/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dc0b13d2a2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>