<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vinayak Savale</title>
    <description>The latest articles on DEV Community by Vinayak Savale (@vinayaksavle).</description>
    <link>https://dev.to/vinayaksavle</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F499071%2F2f0b3765-3f75-44d6-8f58-79b737235951.jpg</url>
      <title>DEV Community: Vinayak Savale</title>
      <link>https://dev.to/vinayaksavle</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vinayaksavle"/>
    <language>en</language>
    <item>
      <title>Day 6 – Guaranteeing Message Ordering in Azure Service Bus</title>
      <dc:creator>Vinayak Savale</dc:creator>
      <pubDate>Sun, 14 Sep 2025 11:24:12 +0000</pubDate>
      <link>https://dev.to/vinayaksavle/day-6-guaranteeing-message-ordering-in-azure-service-bus-5emo</link>
      <guid>https://dev.to/vinayaksavle/day-6-guaranteeing-message-ordering-in-azure-service-bus-5emo</guid>
      <description>&lt;p&gt;In distributed systems, order matters. Imagine:&lt;/p&gt;

&lt;p&gt;A banking system where withdrawal happens before deposit 🏦&lt;/p&gt;

&lt;p&gt;An order system where “Order Shipped” comes before “Order Placed” 📦&lt;/p&gt;

&lt;p&gt;👉 Without proper message ordering, business logic breaks.&lt;/p&gt;

&lt;p&gt;🔹 The Challenge&lt;br&gt;
By default, Azure Service Bus does not guarantee strict ordering across all consumers. Multiple consumers process messages in parallel, which can lead to out-of-order execution.&lt;/p&gt;

&lt;p&gt;So, how do we enforce FIFO (First-In-First-Out) processing when it matters?&lt;/p&gt;

&lt;p&gt;🔹 Solution: Message Sessions&lt;br&gt;
Azure Service Bus introduces Message Sessions to handle ordered processing.&lt;/p&gt;

&lt;p&gt;Messages are grouped using a SessionId.&lt;/p&gt;

&lt;p&gt;Service Bus ensures that all messages in a session are delivered in order.&lt;/p&gt;

&lt;p&gt;Only one receiver processes a given session at a time.&lt;/p&gt;

&lt;p&gt;✅ Example Use Case&lt;br&gt;
👨👩👧 E-commerce Order Processing&lt;/p&gt;

&lt;p&gt;All messages related to Order123 (Created → Packed → Shipped → Delivered) share the same SessionId.&lt;/p&gt;

&lt;p&gt;Service Bus guarantees these events are processed in sequence.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnleekc6vta5l7jralcet.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnleekc6vta5l7jralcet.png" alt="Image" width="750" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsmsil0v1rdyhy123g6xq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsmsil0v1rdyhy123g6xq.png" alt="Image" width="744" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹 Key Benefits&lt;br&gt;
✔ Enforces FIFO processing within a session. ✔ Keeps related messages together. ✔ Avoids complex custom ordering logic.&lt;/p&gt;

&lt;p&gt;🔹 Best Practices&lt;br&gt;
Use SessionId for grouping logically related messages.&lt;/p&gt;

&lt;p&gt;For high throughput, distribute load across multiple sessions.&lt;/p&gt;

&lt;p&gt;Monitor for long-lived sessions that might block processing.&lt;/p&gt;

&lt;p&gt;🔹 Wrapping Up&lt;br&gt;
Message Sessions in Azure Service Bus are the key to achieving reliable message ordering. They ensure business events occur in the correct sequence, keeping workflows consistent and predictable.&lt;/p&gt;

&lt;p&gt;💬 Do you have scenarios where ordering was critical? How did you solve it in your systems?&lt;/p&gt;

</description>
      <category>azurefunctions</category>
      <category>dotnet</category>
      <category>microservices</category>
      <category>messageque</category>
    </item>
    <item>
      <title>Day 5 – Ensuring Message Idempotency with Duplicate Detection in Azure Service Bus</title>
      <dc:creator>Vinayak Savale</dc:creator>
      <pubDate>Sun, 14 Sep 2025 11:20:39 +0000</pubDate>
      <link>https://dev.to/vinayaksavle/day-5-ensuring-message-idempotency-with-duplicate-detection-in-azure-service-bus-llj</link>
      <guid>https://dev.to/vinayaksavle/day-5-ensuring-message-idempotency-with-duplicate-detection-in-azure-service-bus-llj</guid>
      <description>&lt;p&gt;In distributed systems, duplicate messages are inevitable. Network retries, client resends, or failover scenarios can cause the same message to be delivered multiple times.&lt;/p&gt;

&lt;p&gt;👉 But in business workflows like payment processing or order creation, duplicates can be disastrous.&lt;/p&gt;

&lt;p&gt;This is where Duplicate Detection in Azure Service Bus comes into play.&lt;/p&gt;

&lt;p&gt;🔹 What is Duplicate Detection?&lt;br&gt;
A built-in idempotency mechanism in Service Bus.&lt;/p&gt;

&lt;p&gt;Detects and discards messages with the same MessageId if received within a configured time window.&lt;/p&gt;

&lt;p&gt;Saves developers from building complex deduplication logic at the application level.&lt;/p&gt;

&lt;p&gt;🔹 How It Works&lt;br&gt;
Enable Duplicate Detection when creating the Queue/Topic.&lt;/p&gt;

&lt;p&gt;Set a Duplicate Detection History Time Window (from 20 seconds up to 7 days).&lt;/p&gt;

&lt;p&gt;Service Bus maintains a record of MessageIds within that window.&lt;/p&gt;

&lt;p&gt;If a new message with the same MessageId arrives → it is ignored.&lt;/p&gt;

&lt;p&gt;✅ Example Use Case&lt;br&gt;
💳 Payments System&lt;/p&gt;

&lt;p&gt;User clicks “Pay” twice by mistake.&lt;/p&gt;

&lt;p&gt;Both requests send a message with the same TransactionId.&lt;/p&gt;

&lt;p&gt;Duplicate Detection ensures only one message is processed, preventing double charges.&lt;/p&gt;

&lt;p&gt;🔹 Enabling Duplicate Detection in .NET&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwgusqos6lxvuetktappf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwgusqos6lxvuetktappf.png" alt="Image" width="762" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹 Key Benefits&lt;br&gt;
✔ Prevents double processing of messages. &lt;/p&gt;

&lt;p&gt;✔ Reduces risk of financial or logical inconsistencies. &lt;/p&gt;

&lt;p&gt;✔ Simple configuration → no need for custom deduplication storage.&lt;/p&gt;

&lt;p&gt;🔹 Best Practices&lt;br&gt;
Always set a MessageId when sending messages.&lt;/p&gt;

&lt;p&gt;Choose the right time window based on business needs.&lt;/p&gt;

&lt;p&gt;For critical systems → combine with idempotent application logic for extra safety.&lt;/p&gt;

&lt;p&gt;🔹 Wrapping Up&lt;br&gt;
Duplicate Detection is one of the simplest yet most powerful features in Azure Service Bus. It protects your system against message duplication, ensuring data integrity and reliable workflows.&lt;/p&gt;

&lt;p&gt;In Day 6, we’ll explore Message Ordering in Azure Service Bus — how to make sure messages are processed in the sequence they were sent.&lt;/p&gt;

&lt;p&gt;💬 Have you faced issues with duplicate events in your applications? How did you solve them?&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 4 – Handling Failures with Dead-Letter Queues (DLQ) in Azure Service Bus</title>
      <dc:creator>Vinayak Savale</dc:creator>
      <pubDate>Sun, 14 Sep 2025 11:18:31 +0000</pubDate>
      <link>https://dev.to/vinayaksavle/day-4-handling-failures-with-dead-letter-queues-dlq-in-azure-service-bus-5g0h</link>
      <guid>https://dev.to/vinayaksavle/day-4-handling-failures-with-dead-letter-queues-dlq-in-azure-service-bus-5g0h</guid>
      <description>&lt;p&gt;Even in the most reliable systems, not every message can be processed successfully. 👉 What happens to those “poison messages”?&lt;/p&gt;

&lt;p&gt;This is where Dead-Letter Queues (DLQs) come in.&lt;/p&gt;

&lt;p&gt;🔹 What is a Dead-Letter Queue?&lt;br&gt;
A sub-queue attached to every Queue or Topic Subscription in Azure Service Bus.&lt;/p&gt;

&lt;p&gt;Stores messages that cannot be delivered or processed successfully.&lt;/p&gt;

&lt;p&gt;Prevents endless retries or message loss.&lt;/p&gt;

&lt;p&gt;🔹 Common Reasons Messages Go to DLQ&lt;br&gt;
✔ Message exceeds TTL (Time-To-Live). &lt;/p&gt;

&lt;p&gt;✔ Message is too large. &lt;/p&gt;

&lt;p&gt;✔ Max Delivery Count exceeded (message kept failing processing). &lt;/p&gt;

&lt;p&gt;✔ Explicit dead-lettering by application.&lt;/p&gt;

&lt;p&gt;✅ Real-World Example&lt;br&gt;
Imagine a payment processing system:&lt;/p&gt;

&lt;p&gt;A malformed message without PaymentId keeps failing.&lt;/p&gt;

&lt;p&gt;Instead of blocking the queue forever, it moves to DLQ for later inspection.&lt;/p&gt;

&lt;p&gt;This ensures:&lt;/p&gt;

&lt;p&gt;Healthy messages keep flowing.&lt;/p&gt;

&lt;p&gt;Faulty messages can be debugged.&lt;/p&gt;

&lt;p&gt;🔹 Accessing DLQ in .NET&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpgqg3y0desiudkwx9903.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpgqg3y0desiudkwx9903.png" alt="Image" width="800" height="558"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹 Key Benefits of DLQ&lt;br&gt;
✔ Reliability – Messages aren’t lost. &lt;/p&gt;

&lt;p&gt;✔ Debugging – Root cause analysis of failed messages. &lt;/p&gt;

&lt;p&gt;✔ Isolation – Poison messages don’t block valid ones.&lt;/p&gt;

&lt;p&gt;🔹 Best Practices&lt;br&gt;
Monitor DLQ regularly → Don’t let it overflow.&lt;/p&gt;

&lt;p&gt;Automate processing → Create a retry mechanism.&lt;/p&gt;

&lt;p&gt;Alerting → Set up Azure Monitor alerts for DLQ growth.&lt;/p&gt;

&lt;p&gt;🔹 Wrapping Up&lt;br&gt;
Dead-Letter Queues are your safety net in message-driven systems. They ensure your application remains resilient and messages are never silently lost.&lt;/p&gt;

&lt;p&gt;In Day 5, we’ll explore Duplicate Detection in Azure Service Bus — how to prevent the same message from being processed multiple times.&lt;/p&gt;

&lt;p&gt;💬 How are you handling poison messages in your systems? Do you rely on DLQ or custom error handling?&lt;/p&gt;

&lt;h1&gt;
  
  
  Azure #ServiceBus #DotNet #Messaging #DeadLetterQueue #CloudComputing #Microservices #Resilience #SystemDesign #ErrorHandling
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Day 3 – Message Sessions &amp; Ordering in Azure Service Bus with .NET</title>
      <dc:creator>Vinayak Savale</dc:creator>
      <pubDate>Sun, 14 Sep 2025 11:16:30 +0000</pubDate>
      <link>https://dev.to/vinayaksavle/day-3-message-sessions-ordering-in-azure-service-bus-with-net-3079</link>
      <guid>https://dev.to/vinayaksavle/day-3-message-sessions-ordering-in-azure-service-bus-with-net-3079</guid>
      <description>&lt;p&gt;When dealing with distributed systems, one challenge that often comes up is:&lt;/p&gt;

&lt;p&gt;👉 How do we ensure that related messages are processed in the correct order?&lt;/p&gt;

&lt;p&gt;Azure Service Bus solves this problem with Message Sessions.&lt;/p&gt;

&lt;p&gt;🔹 What Are Message Sessions?&lt;br&gt;
A Message Session in Service Bus is like a conversation thread that groups related messages together.&lt;/p&gt;

&lt;p&gt;Each message has a SessionId.&lt;/p&gt;

&lt;p&gt;All messages with the same SessionId are delivered to the same receiver.&lt;/p&gt;

&lt;p&gt;Ensures FIFO (First-In, First-Out) ordering within that session.&lt;/p&gt;

&lt;p&gt;Useful when you have stateful processing.&lt;/p&gt;

&lt;p&gt;✅ Real-World Example&lt;br&gt;
Imagine an e-commerce order system:&lt;/p&gt;

&lt;p&gt;Each order may generate multiple messages (Order Placed, Payment Processed, Order Packed, Shipped).&lt;/p&gt;

&lt;p&gt;You need all messages for OrderID=12345 to be processed in order.&lt;/p&gt;

&lt;p&gt;👉 By assigning SessionId = OrderID, Service Bus guarantees that all events of the order are processed sequentially.&lt;/p&gt;

&lt;p&gt;🔹 Enabling Sessions in .NET&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffil5598thokzmlo7sz4b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffil5598thokzmlo7sz4b.png" alt="Image" width="790" height="586"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdapeg02cfdozmdqlw43u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdapeg02cfdozmdqlw43u.png" alt="Image" width="738" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹 Key Benefits of Message Sessions&lt;br&gt;
✔ Message Ordering – FIFO for related messages. &lt;/p&gt;

&lt;p&gt;✔ Stateful Processing – Sessions can maintain state. &lt;/p&gt;

&lt;p&gt;✔ Concurrency Control – Different sessions can be processed in parallel.&lt;/p&gt;

&lt;p&gt;🔹 When to Use Message Sessions?&lt;br&gt;
Order Processing (all events for one order go together).&lt;/p&gt;

&lt;p&gt;Chat Applications (all messages from one conversation thread stay ordered).&lt;/p&gt;

&lt;p&gt;Workflow Management (step-by-step sequences per workflow).&lt;/p&gt;

&lt;p&gt;🔹 Wrapping Up&lt;br&gt;
Message Sessions make Azure Service Bus powerful for real-world, stateful workflows. They ensure messages that belong together stay together and are processed in order.&lt;/p&gt;

&lt;p&gt;💬 Have you used Message Sessions in your projects, or do you rely more on stateless consumers?&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 2 – Queues vs Topics in Azure Service Bus with .NET</title>
      <dc:creator>Vinayak Savale</dc:creator>
      <pubDate>Sun, 14 Sep 2025 11:12:53 +0000</pubDate>
      <link>https://dev.to/vinayaksavle/day-2-queues-vs-topics-in-azure-service-bus-with-net-2681</link>
      <guid>https://dev.to/vinayaksavle/day-2-queues-vs-topics-in-azure-service-bus-with-net-2681</guid>
      <description>&lt;p&gt;When building distributed applications, one of the most important design decisions is how services will communicate.&lt;/p&gt;

&lt;p&gt;Azure Service Bus gives us two powerful messaging patterns: Queues and Topics. While they might seem similar at first, they serve very different purposes depending on the scenario.&lt;/p&gt;

&lt;p&gt;In this article (Day 2 of the series), let’s break down the differences, real-world use cases, and .NET implementation for both.&lt;/p&gt;

&lt;p&gt;🔹 Azure Service Bus Queue&lt;br&gt;
A Queue is a point-to-point communication channel:&lt;/p&gt;

&lt;p&gt;One sender → One receiver&lt;/p&gt;

&lt;p&gt;Messages are stored until a receiver picks them up.&lt;/p&gt;

&lt;p&gt;Processed in FIFO (First-In, First-Out) order.&lt;/p&gt;

&lt;p&gt;👉 Use Queues when you want to ensure only one consumer processes a message.&lt;/p&gt;

&lt;p&gt;✅ Real-world example:&lt;br&gt;
An order processing system where each order should be handled by one service instance.&lt;/p&gt;

&lt;p&gt;🔹 Azure Service Bus Topic &amp;amp; Subscriptions&lt;br&gt;
A Topic is like a broadcast system.&lt;/p&gt;

&lt;p&gt;One sender → Multiple receivers&lt;/p&gt;

&lt;p&gt;A message is sent to the Topic, and multiple Subscriptions can receive it.&lt;/p&gt;

&lt;p&gt;Each subscription can apply filters (only get the messages it cares about).&lt;/p&gt;

&lt;p&gt;👉 Use Topics when you want multiple services to react to the same event.&lt;/p&gt;

&lt;p&gt;✅ Real-world example:&lt;br&gt;
A payment event:&lt;/p&gt;

&lt;p&gt;Billing system → logs the payment.&lt;/p&gt;

&lt;p&gt;Notification system → sends receipt email.&lt;/p&gt;

&lt;p&gt;Analytics system → updates dashboards.&lt;/p&gt;

&lt;p&gt;🔹 Code Example in .NET&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpp88g7yjzcs8yjtzx6mu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpp88g7yjzcs8yjtzx6mu.png" alt=" " width="738" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6w7k1ruvf9qbaqs5gdjh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6w7k1ruvf9qbaqs5gdjh.png" alt=" " width="744" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹 Wrapping Up&lt;br&gt;
Queue = One-to-one communication.&lt;/p&gt;

&lt;p&gt;Topic = One-to-many communication.&lt;/p&gt;

&lt;p&gt;Both are durable, scalable, and reliable messaging patterns in Azure Service Bus.&lt;/p&gt;

&lt;p&gt;👉 The right choice depends on whether your message should go to one service or many services.&lt;/p&gt;

&lt;p&gt;💬 Which messaging pattern have you used more in your projects — Queues or Topics?&lt;/p&gt;

</description>
      <category>azure</category>
      <category>microservices</category>
      <category>dotnet</category>
      <category>azurefunctions</category>
    </item>
    <item>
      <title>Day 1 – Introduction to Azure Service Bus in .NET</title>
      <dc:creator>Vinayak Savale</dc:creator>
      <pubDate>Sun, 14 Sep 2025 11:02:33 +0000</pubDate>
      <link>https://dev.to/vinayaksavle/day-1-introduction-to-azure-service-bus-in-net-389k</link>
      <guid>https://dev.to/vinayaksavle/day-1-introduction-to-azure-service-bus-in-net-389k</guid>
      <description>&lt;p&gt;In today’s world of distributed systems and microservices, one of the biggest challenges is ensuring reliable communication between applications.&lt;/p&gt;

&lt;p&gt;That’s where Azure Service Bus comes into play. It’s a fully managed enterprise messaging service that helps: ✅ Decouple applications ✅ Improve scalability ✅ Build resilient communication pipelines&lt;/p&gt;

&lt;p&gt;🔹 What is Azure Service Bus?&lt;br&gt;
Think of Service Bus like a post office for your applications:&lt;/p&gt;

&lt;p&gt;Applications send messages (letters) to Service Bus.&lt;/p&gt;

&lt;p&gt;Service Bus stores them securely until the receiving service is ready.&lt;/p&gt;

&lt;p&gt;Applications receive messages when they can process them.&lt;/p&gt;

&lt;p&gt;This design provides: ✔ Loose coupling ✔ Fault tolerance ✔ Better scalability&lt;/p&gt;

&lt;p&gt;🔹 Core Concepts&lt;br&gt;
Namespace → A logical container grouping queues &amp;amp; topics.&lt;/p&gt;

&lt;p&gt;Queues → Point-to-point messaging (one sender → one receiver). Follows FIFO order.&lt;/p&gt;

&lt;p&gt;Topics &amp;amp; Subscriptions → Publish/Subscribe model. A single message can reach multiple subscribers. Perfect for event-driven systems.&lt;/p&gt;

&lt;p&gt;Message → The basic unit of communication, including payload + metadata.&lt;/p&gt;

&lt;p&gt;🔹 .NET Integration Example&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frjjjfl977x01ub5d2gzu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frjjjfl977x01ub5d2gzu.png" alt=" " width="744" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here’s how simple it is to send a message to a Service Bus queue using Azure SDK for .NET:&lt;/p&gt;

&lt;p&gt;Minimize image&lt;br&gt;
Edit image&lt;br&gt;
Delete image&lt;/p&gt;

&lt;p&gt;Add a caption (optional)&lt;br&gt;
🔹 Real-World Applications&lt;br&gt;
🛒 Order Processing Systems → Decouple order placement from payment &amp;amp; inventory.&lt;/p&gt;

&lt;p&gt;📡 IoT Devices → Buffer messages from millions of devices before processing.&lt;/p&gt;

&lt;p&gt;⚡ Event-driven Microservices → Publish once, let multiple services react.&lt;/p&gt;

&lt;p&gt;🔄 Legacy Integration → Connect old on-premise apps with modern cloud systems.&lt;/p&gt;

&lt;p&gt;🔹 Wrapping Up&lt;br&gt;
Azure Service Bus provides the foundation for building reliable, scalable, and decoupled systems in the cloud.&lt;/p&gt;

&lt;p&gt;Today we covered: ✔ What Service Bus is ✔ Why it’s important ✔ Core concepts (namespace, queues, topics) ✔ A simple .NET integration example&lt;/p&gt;

&lt;p&gt;💬 What’s your experience with messaging systems? Have you worked with Azure Service Bus, RabbitMQ, or Kafka? Drop your thoughts below 👇&lt;/p&gt;

</description>
      <category>microservices</category>
      <category>azuservicebus</category>
      <category>azurefunctions</category>
      <category>azure</category>
    </item>
    <item>
      <title>Basic Authentication and Authorization</title>
      <dc:creator>Vinayak Savale</dc:creator>
      <pubDate>Wed, 20 Mar 2024 09:58:15 +0000</pubDate>
      <link>https://dev.to/vinayaksavle/basic-authentication-and-authorization-3fcm</link>
      <guid>https://dev.to/vinayaksavle/basic-authentication-and-authorization-3fcm</guid>
      <description>&lt;p&gt;In the .NET framework, authentication and authorization are two important processes that help ensure the security of applications and their data.&lt;/p&gt;

&lt;p&gt;"Authentication" is the process of verifying the identity of a user, device, or system. In the context of the .NET framework, it involves confirming that the person or thing claiming to be a certain party is indeed that party. This is usually done through logins, passwords, or other means of verification.&lt;/p&gt;

&lt;p&gt;"Authorization," on the other hand, is the process of deciding what actions a user, device, or system is allowed to perform. This is typically determined by the results of the authentication process. If a user has been authenticated, authorization dictates what they can do within the application.&lt;/p&gt;

&lt;p&gt;The Identity Provider (IP) is a component in the .NET framework that handles these processes. It helps manage users, their associated data, and the claims they make, which are used to make authorization decisions.&lt;/p&gt;

&lt;p&gt;Here's a simple example of how this might work in a .NET application:&lt;/p&gt;

&lt;p&gt;A user attempts to log in to a website using their username and password.&lt;/p&gt;

&lt;p&gt;The application checks these credentials against its records (perhaps using ASP.NET Identity).&lt;/p&gt;

&lt;p&gt;If the credentials are valid, the user is authenticated and their identity is established.&lt;/p&gt;

&lt;p&gt;Once authenticated, the application checks its authorization rules to see what actions the user is allowed to perform. This information might be stored in a database or determined based on the user's role or other attributes.&lt;/p&gt;

&lt;p&gt;If the user is authorized to perform a certain action, they are allowed to proceed. Otherwise, their request is denied.&lt;/p&gt;

&lt;p&gt;In layman's terms, authentication is like showing your ID at a nightclub to prove you're old enough to enter, and authorization is figuring out if you're on the guest list or if you can actually dance on the tables.&lt;/p&gt;

</description>
      <category>authentication</category>
      <category>authorization</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Trust Issues with setTimeout()! 💔 setTimeout Interview Question</title>
      <dc:creator>Vinayak Savale</dc:creator>
      <pubDate>Mon, 01 Feb 2021 16:35:21 +0000</pubDate>
      <link>https://dev.to/vinayaksavle/trust-issues-with-settimeout-settimeout-interview-question-32ba</link>
      <guid>https://dev.to/vinayaksavle/trust-issues-with-settimeout-settimeout-interview-question-32ba</guid>
      <description>&lt;h1&gt;
  
  
  setTimeout has trust issues! 💔
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;a&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Example&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you execute the above program it might take 5 sec or more than 5 sec to log the result of function a. Yes, you read it right because it all depends on the callstack.&lt;/p&gt;

&lt;p&gt;To prove the above statement we will see one example:&lt;br&gt;
Example 1:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;a&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Callback&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;End&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;startDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;endDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;startDate&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Added 10 sec timer&lt;/span&gt;
&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;endDate&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;startDate&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;endDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;While expires&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Guess what will be the output of the above program. You might be thinking that first in the console &lt;strong&gt;Start&lt;/strong&gt; will get print then &lt;strong&gt;End&lt;/strong&gt; will get print. Which is absolutely right! After that you might be thinking setTimeout function a will execute after 5 sec but the answer is &lt;strong&gt;NO&lt;/strong&gt;. Because at first GEC (Global execution context) is created and it adds in callstack as it will take 10 sec to run GEC code and setTimeout will get registered in Callback Queue and event loop will call setTimeout function only when callstack gets empty so that's why it will execute after 10 sec. So that's how the whole concurrency model works.&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Start&lt;/span&gt;
&lt;span class="nx"&gt;End&lt;/span&gt;
&lt;span class="nx"&gt;While&lt;/span&gt; &lt;span class="nx"&gt;expires&lt;/span&gt;
&lt;span class="nx"&gt;Callback&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Take one more example to understand the concept.&lt;br&gt;
Example 2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;a&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Callback&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;End&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now guess what will be the output of the program. In the above example, you can see setTimeout will be in callback queue and it will be called only after the callstack gets empty which will be after &lt;strong&gt;Start&lt;/strong&gt; and &lt;strong&gt;End&lt;/strong&gt; print in the console. &lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Start&lt;/span&gt;
&lt;span class="nx"&gt;End&lt;/span&gt;
&lt;span class="nx"&gt;Callback&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You must be thinking who the hell writes 0 sec in setTimeout. But you can write 0 sec in setTimeout in particular condition like if you want to execute particular code after all function gets executed as setTimeout function will be in callback queue which will be executed once callstack gets empty. In such a condition you can use 0 sec in setTimeout.&lt;/p&gt;

&lt;p&gt;Even I was not aware of this till I watched the &lt;em&gt;Namaste javascript&lt;/em&gt; series by &lt;strong&gt;Akshay Saini&lt;/strong&gt;. Believe me, friends many senior developers will fail to answer correctly the output of the above examples.&lt;/p&gt;

&lt;p&gt;So, This is my first post do let me know in the comment section if you really amazed by this concept.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>settimeout</category>
      <category>interviewquestions</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
