<?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 Bayram Kaynarpınar on Medium]]></title>
        <description><![CDATA[Stories by Bayram Kaynarpınar on Medium]]></description>
        <link>https://medium.com/@bayramkynrpnar?source=rss-1dbbe0daa17e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UVXFA6CsY-tLRQnMzQ4wIg.jpeg</url>
            <title>Stories by Bayram Kaynarpınar on Medium</title>
            <link>https://medium.com/@bayramkynrpnar?source=rss-1dbbe0daa17e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 08:28:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bayramkynrpnar/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[WHAT IS RABBIT MQ?]]></title>
            <link>https://medium.com/@bayramkynrpnar/what-is-rabbit-mq-beb54f1d649e?source=rss-1dbbe0daa17e------2</link>
            <guid isPermaLink="false">https://medium.com/p/beb54f1d649e</guid>
            <category><![CDATA[rabbitmq]]></category>
            <category><![CDATA[software-technology]]></category>
            <category><![CDATA[message-queue]]></category>
            <category><![CDATA[message-broker]]></category>
            <category><![CDATA[queue]]></category>
            <dc:creator><![CDATA[Bayram Kaynarpınar]]></dc:creator>
            <pubDate>Thu, 06 Jan 2022 21:13:20 GMT</pubDate>
            <atom:updated>2022-01-06T21:13:20.899Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*jkBmsvXAQZ6ajOKnIbQX_A.png" /></figure><p>Hello everybody :) I will talk about RabbitMq. Let’s start!</p><p>RabbitMq started in 2007 as a joint venture between LShift and CohesiveFT, and it was developed by Rabbit Technologies Ltd. It was written in the Erlang programming language and released as open source.</p><p>RabbitMq, which offers us a solution under the Message Broker category, uses the AMQP (Active Messaging Queuing Protocol) protocol. It also has support for HTTP, STOMP, MQTT protocols.</p><p>(AMQP is an open line of communication standard for apps and organizations. Thus, reliable messaging can be provided between different platforms)</p><p>If we come to the question of what RabbitMq provides us; The communication between our applications can be synchronous and asynchronous. RabbitMq allows us to use many different async Messaging Patterns. In RabbitMq, the operation is as follows:</p><p>After the producer publishes the message, the exchange in RabbitMQ receives the message. Exchange sends the message it receives to the queue through RabbitMQ’s appropriate route. The route specifies how the message will be sent from the exchange to the queue. In the queue messages are sorted.</p><p>Let’s look at the overall benefits of using a Message Broker;</p><ul><li>We can control an asynchronous process thanks to RabbitMQ. This asynchronous structure may be useful in situations where we cannot react to a user’s request immediately. By providing the predicted waiting time, we will not expose the user to an unnecessary Response Time</li><li>Both temporary and persistent messages are supported by RabbitMQ.</li><li>Rabbit Mq supports both point-to-point and pub-sub message transmission.</li><li>There are a variety of options for configuring messages and queues. In this way, we can integrate it into the scenario of our application as we want.</li></ul><p>After talking about RabbitMQ terms and what it does, we can also talk about usage scenarios. Now let’s talk about Rabbit Mq terms and the patterns it uses;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*Whj9VtDon39ONErTVsg4Wg.png" /></figure><h4><strong>Message Brokers</strong></h4><p>Message Broker is the general name given to the message queue system. It can also be viewed as a messaging intermediary. It is a computer module that converts the sender’s images from the messaging protocol to the receiver’s image.</p><h4><strong>Messages</strong></h4><p>The x-max-priority that messages can receive can be determined in RabbitMq. Messages can be prioritized in this manner</p><h4><strong>Producer</strong></h4><p>It’s the part of the communication that comes from the sender. This is where you may send messages to be processed.</p><h4><strong>Exchange</strong></h4><p>We can say that Exchange is the entity that forwards the message received from the producer to the relevant Queue. How it does this is related to Exchange Types. Exchange Types only concern the producer side.</p><p><strong><em>— Direct Exchanges:</em></strong></p><p>The default is Exchange. As a consequence of scanning all Queues with the routing key, it is the transmission of the message to all Queues that are tied to the appropriate routing key. The message is disregarded if the associated queue cannot be located.</p><p><strong>— Header Exchanges:</strong></p><p>It matches the header value sent with the message and the value bind to the Queue according to the value given to the “x-match” key and forwarded to the appropriate queues.</p><p><strong>— Fanout Exchange:</strong></p><p>It is the structure that ensures that incoming messages are sent equally to all queues without discrimination. After the producer sends the message, the fan-out exchange receives the message and distributes it to the queues. Commonly used in broadcasting situations.</p><p><strong>— Topic Exchange:</strong></p><p>One of the reasons why RabbitMq is preferred is Topic Exchange. It works with the routing key, which receives the messages and is passed to the relevant queues as a parameter. The difference between this and the Direct Exchange structure is that we may supply a String with the standards we established when giving the routing key. In this way, we can shape the Routing Key as we want.</p><h4><strong>Queue</strong></h4><p>The task of the Queue is to keep the messages on themselves and convey the messages it has ordered to the consumers. Sorting works with FIFO (First In First Out) logic. There are a lot of features in the queue. Let’s mention the most commonly used features:</p><p><strong>— Layz Mode(x-queue-mode):</strong></p><p>It reduces the usage in ram by writing the messages in the queue to the disk when it is not a consumer. In this way, resource consumption is always effective in a non-consumer structure</p><p><strong>— Durability:</strong></p><p>In this feature selection, it is decided whether the queue will continue from where it left off when the broker restarts</p><p><strong>— Auto Delete:</strong></p><p>Because of this feature, if there is no consumer subscribed to the queue, the queue is automatically deleted.</p><p><strong>— Max Lenght Bytes(x-max-lenght-bytes):</strong></p><p>The messages’ size can be restricted. Messages that are too large for the queue are ignored.</p><p><strong>— Exclusive:</strong></p><p>It is only used for one connection, and it is deleted after the connection is complete. (closed)</p><h4><strong>Consumer</strong></h4><p>It is the part that subscribes to the queues and processes the messages. Here is where the task that has to be done gets completed. It transmits a bit of ack information once the message is processed. After receiving the Ack, the message is removed from the queue. If there is a message in the queue it is listening to and the consumer is standing, it connects to these queues without any further triggering. It receives and processes the message.</p><h3>Messaging Pattern’s</h3><p><strong>Publish-Subscribe Communication:</strong></p><p>The message sent from the producer can be sent to different queues and received and processed by consumers doing various tasks.</p><p><strong>Message Queue :</strong></p><p>The message sent by the producer can be taken into the same queue and processed by the consumers doing the same job.</p><p><strong>Many-To-One:</strong></p><p>Messages of the same type sent from many different producers can be placed in the same queue and processed by the consumer.</p><p><strong>Request/Reply:</strong></p><p>After the consumer has processed the message received by the producer, it can return the response to the producer via another queue.</p><p>What are the benefits of RabbitMq in general, and what are the features?</p><p>Because of Smart Broker/ Dump Consumer, the control is on the broker side, not the consumer side. If the ACK feature comes in Rabbit MQ, this message is removed from the queue, thus ensuring the message transmission. The broker keeps the information of where it is in the queue.</p><p>Rabbit MQ works with the principle of the Push Model. In other words, the broker sends the messages to the relevant consumers, so the broker undertakes to distribute the messages equally to the consumers.</p><p>Messages can be stored persistently in queues. In another saying, if the broker is restarted, your messages will not be lost and will continue from where they left off.</p><p>It has a Dead Letter structure. In other words, if the consumer receives the message and receives an error during the process, in such a case, the message is sent to the dead-letter exchange.</p><p>Retry message, on the other hand, is to send the error messages to the consumer as many times as you specify and try again.</p><p>So, where does this Rabbit Mq use? In which circumstances should Message Broker and Queuing technologies be used?</p><p><em>For example, let’s consider a large-scale project with many stages. Before concluding this project let’s have the controls that need to happen and the steps that depend on these controls. After each step is finished, go to the next step and reach the result. Even if an error occurs before reaching the result, it should transmit the incorrect message to a different location, allowing the activity to continue without interruption. Well, let’s come to the question of what is the place of RabbitMq in such a scenario. The message to be processed is sent to a queue that the first step listens and the process starts. When the first step is finished, it sends the message to a queue that the second step listens, and the second step continues to perform its work regardless of the work done by the first step, and in the case of success, it sends the message to the queue that another step listens. In this way, asynchronous progress can be achieved. In the event of an error in the steps, the error states and the information in which the error was received go to the error queue and the messages continue to be processed without disturbing the main operation.</em></p><p>Let’s talk about another example.</p><p><em>Let’s consider an application that performs certain operations on a file and has a response time of up to 5 minutes. After the users send the file that they want to take action, the actions that the users want to do should be sent to the application in a certain order. This is where Rabbit Mq queues come into play. For each user, the message and its content wait to be processed in the queue. Waiting time is transferred to the user and operations to the file proceed asynchronously. After the necessary actions are fulfilled, the user is provided with feedback.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=beb54f1d649e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>