<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Messaging on Java &amp; Software Architecture Knowledge Hub</title><link>https://samirsahoo.github.io/design-patterns-hub/tags/messaging/</link><description>Recent content in Messaging on Java &amp; Software Architecture Knowledge Hub</description><generator>Hugo</generator><language>en-US</language><copyright>© 2026 Samir Kumar Sahoo (https://github.com/samirsahoo). All rights reserved.</copyright><atom:link href="https://samirsahoo.github.io/design-patterns-hub/tags/messaging/index.xml" rel="self" type="application/rss+xml"/><item><title>REST vs GraphQL vs gRPC vs Messaging</title><link>https://samirsahoo.github.io/design-patterns-hub/comparisons/rest-graphql-grpc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/comparisons/rest-graphql-grpc/</guid><description>&lt;h2 id="the-short-answer"&gt;The short answer&lt;a class="heading-anchor" href="#the-short-answer" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;div class="table-wrap" tabindex="0" role="region" aria-label="Table"&gt;&#10;&lt;table&gt;&#10; &lt;thead&gt;&#10; &lt;tr&gt;&#10; &lt;th&gt;&lt;/th&gt;&#10; &lt;th&gt;REST&lt;/th&gt;&#10; &lt;th&gt;GraphQL&lt;/th&gt;&#10; &lt;th&gt;gRPC&lt;/th&gt;&#10; &lt;th&gt;Messaging (Kafka, RabbitMQ)&lt;/th&gt;&#10; &lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Style&lt;/td&gt;&#10; &lt;td&gt;Resources + HTTP verbs&lt;/td&gt;&#10; &lt;td&gt;Client-specified query over one endpoint&lt;/td&gt;&#10; &lt;td&gt;Remote procedure calls from a &lt;code&gt;.proto&lt;/code&gt; contract&lt;/td&gt;&#10; &lt;td&gt;Asynchronous events or commands&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Payload&lt;/td&gt;&#10; &lt;td&gt;Usually JSON&lt;/td&gt;&#10; &lt;td&gt;JSON&lt;/td&gt;&#10; &lt;td&gt;Protocol Buffers (binary)&lt;/td&gt;&#10; &lt;td&gt;Any (Avro, Protobuf, JSON)&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Transport&lt;/td&gt;&#10; &lt;td&gt;HTTP/1.1, 2, 3&lt;/td&gt;&#10; &lt;td&gt;HTTP (POST/GET), WebSocket for subscriptions&lt;/td&gt;&#10; &lt;td&gt;&lt;strong&gt;HTTP/2&lt;/strong&gt; only&lt;/td&gt;&#10; &lt;td&gt;Broker protocol&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Coupling in time&lt;/td&gt;&#10; &lt;td&gt;Synchronous&lt;/td&gt;&#10; &lt;td&gt;Synchronous&lt;/td&gt;&#10; &lt;td&gt;Synchronous (+ streams)&lt;/td&gt;&#10; &lt;td&gt;&lt;strong&gt;Decoupled&lt;/strong&gt;&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;HTTP caching&lt;/td&gt;&#10; &lt;td&gt;Excellent (GET, ETags, CDNs)&lt;/td&gt;&#10; &lt;td&gt;Hard (POST, varied queries)&lt;/td&gt;&#10; &lt;td&gt;None built in&lt;/td&gt;&#10; &lt;td&gt;n/a&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Browser support&lt;/td&gt;&#10; &lt;td&gt;Native&lt;/td&gt;&#10; &lt;td&gt;Native&lt;/td&gt;&#10; &lt;td&gt;Needs gRPC-Web / Connect proxy&lt;/td&gt;&#10; &lt;td&gt;No (via a back end)&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Streaming&lt;/td&gt;&#10; &lt;td&gt;SSE, chunked&lt;/td&gt;&#10; &lt;td&gt;Subscriptions&lt;/td&gt;&#10; &lt;td&gt;&lt;strong&gt;Client, server and bidirectional&lt;/strong&gt;&lt;/td&gt;&#10; &lt;td&gt;Inherent&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Contract&lt;/td&gt;&#10; &lt;td&gt;OpenAPI (optional)&lt;/td&gt;&#10; &lt;td&gt;Schema (required, introspectable)&lt;/td&gt;&#10; &lt;td&gt;&lt;code&gt;.proto&lt;/code&gt; (required, code-generated)&lt;/td&gt;&#10; &lt;td&gt;Schema registry (recommended)&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;td&gt;Best for&lt;/td&gt;&#10; &lt;td&gt;Public APIs, CRUD, cacheable reads&lt;/td&gt;&#10; &lt;td&gt;Many clients with different data needs; aggregating back ends&lt;/td&gt;&#10; &lt;td&gt;Internal service-to-service, low latency, polyglot&lt;/td&gt;&#10; &lt;td&gt;Events, workflows, buffering, fan-out&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;ByteByteGo&amp;rsquo;s timeline of API styles (SOAP → REST → GraphQL → gRPC) makes the same point: each style emerged for a different set of problems; none replaced the others.&lt;/p&gt;</description></item><item><title>Designing a Notification Service</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/case-studies/notification-service/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/case-studies/notification-service/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;a class="heading-anchor" href="#overview" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Almost every product sends notifications: order confirmations, password resets, chat messages, marketing campaigns. A &lt;strong&gt;notification service&lt;/strong&gt; centralises this so product teams send an event (&amp;ldquo;order shipped to user 42&amp;rdquo;) and the service decides &lt;strong&gt;whether, where and how&lt;/strong&gt; to deliver it. ByteByteGo&amp;rsquo;s flowchart of how Slack decides to send a notification shows why &amp;ldquo;a simple feature&amp;rdquo; is not simple: a dozen checks (muted channels, do-not-disturb, active on desktop, mention type, thread settings) run before anything is sent.&lt;/p&gt;</description></item><item><title>Message Queues and Delivery Semantics</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/message-queues-and-delivery-semantics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/message-queues-and-delivery-semantics/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;message queue&lt;/strong&gt; is a durable buffer between components: a &lt;strong&gt;producer&lt;/strong&gt; puts a message on it and continues; a &lt;strong&gt;consumer&lt;/strong&gt; takes it off and processes it later. The queue makes communication &lt;strong&gt;asynchronous&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p&gt;The handwritten notes summarise why this matters: in small systems writes are fast, but in large systems a request may take a long time, and with many clients the server cannot keep up. With a queue, the client gets an acknowledgement (a receipt) immediately, the task is processed when a worker is free, and the client can check the result later.&lt;/p&gt;</description></item></channel></rss>