<?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 ADITYA PANDEY on Medium]]></title>
        <description><![CDATA[Stories by ADITYA PANDEY on Medium]]></description>
        <link>https://medium.com/@adityapandey18501?source=rss-279a2d48ad02------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fe9KTXkSXiWBornj</url>
            <title>Stories by ADITYA PANDEY on Medium</title>
            <link>https://medium.com/@adityapandey18501?source=rss-279a2d48ad02------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 23:19:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adityapandey18501/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[Messages Queue | Bull MQ]]></title>
            <link>https://medium.com/@adityapandey18501/messages-queue-bull-mq-3dff83970919?source=rss-279a2d48ad02------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dff83970919</guid>
            <category><![CDATA[systems-thinking]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[message-queue]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[ADITYA PANDEY]]></dc:creator>
            <pubDate>Mon, 23 Nov 2026 07:25:47 GMT</pubDate>
            <atom:updated>2026-11-23T07:25:47.837Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently I went through a concept which is queuing system. Sharing my knowledge that, I got it from exploring this.</p><h3>Why to use a Messaging queue?</h3><p>Without messging queue a server had to perform synchronous tasks, it had to see the whole process all the way from managing the requests, updating the database, sending the message and receving confirmation of message, Through these tasks on going the user can experience lag as this would take time also if the messaging service will crash the whole server could crash as each thing is dependent on each other.</p><p>A message queue is build up on the queue data structure which works on the FIFO (First in First out) concept. Every one could build this message queue. But there are some already players in the market who have implemented it the optimised manner and provided various functions to use the best out of it. One of them is Bull MQ, it is widely used in the market and best fits with node js backend.</p><h3>Architecture to implement the Messaging Queue:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jiTeNIV4ybHjGTduPXxRcQ.png" /></figure><p>In a Messaging Queue there is always three things present, producer, worker and the queue.</p><p>Producer is the one who produce the messages, worker is the one who recevie the messages and process it. The queue is the one where the messages is just added and it just took out by the worker in the FIFO format.</p><h3>CASE 1 : Producer produces the message but the worker crashes on some message.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W7IKLO2ArSCUkSBuuDwbZQ.png" /></figure><p>In this case the producer produces the messages and after sometime the worker get’s crached on receiving a message and just shuts down and wakes up after sometime and process the message 4. But if we see that due to this the message 3 is lost.</p><p>So to fix this problem what we can do is we would just re add the message if the worker crashes so that our message does’nt get lost.</p><h3>CASE 2: Producer produces the errored message that will always make the worker shut down</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JpbBT-g0quaRxLhDNlEcsw.png" /></figure><p>In this case the worker does’nt get the error but the message that is been passed to the worker had a error.</p><p>So to resolve this issue what we can do is to have a error queue where we will push that message to the error queue eventually giving a second chance to message to get processed.</p><p>The case 2 architecture is a industry standard that is been followed to make a fault tollerant message queue system.</p><p>In the next blog, I will be making a message queue through bull mq and will discuss the architecture bull mq uses.</p><p>Thankyou for reading !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dff83970919" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>