Sitemap
Doğan ÖZTÜRK

Doğan ÖZTÜRK

Senior Software Architecture | Senior Software Developer https://www.linkedin.com/in/ozturkdogan/

RabbitMQ Example for tutorial

2 min readSep 13, 2023

--

install ‘RabbitMQ.Client’ (https://www.nuget.org/packages/RabbitMQ.Client)

RabbitMQ Terms

En: Producer (Publisher) The party that creates, sends or provides the message.

Tr: Producer (Publisher) Mesajı oluşturan, gönderen veya sağlayan taraftır.

En: Consumer: It is the consuming party that receives and processes data from the "queue" it subscribes to.

Tr: Consumer: Abone olduğu “queue” dan veriyi alıp işleyen tüketen taraftır.

En: Queue : The queue to which the message is attached and subscribed by the Consumer.

Tr: Queue: Mesjın eklendiği ve Consumer tarafından abone olan kuyruktur.

En: Exchange: Used as an intermediary for forwarding the message. The message transmitted to "exchance" by the producer is forwarded to the queue with the help of Exchange type (Header attribute), binding and routing key.

Tr: Exchange: Mesajı yönlendirme için aracı olarak kullanılır. Producer tarafından “exchance” e iletilen mesaj, Exchange type(Header attribute), binding ve routing key yardımı ile queue iletmektedir.

En: Exchange Type: Specifies how and to which “queue” the message will be forwarded.

Tr: Exchance Type: Mesajın hangi “queue”ya ne şekilde iletileceğini belirtir.

En: Binding: It is the connection between Exchange and queue.

Get Doğan ÖZTÜRK’s stories in your inbox

Join Medium for free to get updates from this writer.

Tr: Binding: Exchance ve queue arasındaki bağlantıdır.

Queue Properties

En: Name: The name of the queue we defined.

Tr: Name: Tanımlamış olduğumuz kuyruğun adı.

En: Durable: Related to the lifetime of the queue. If we want persistence, we must set true. For our example, we will be creating in-memory. In this case, the queue will be deleted when the broker restarts.

Tr: Durable: Kuyruğun yaşam süresi ile alakalı. Eğer persistence olmasını istersek true set etmeliyiz. Biz örneğimiz için in-memory olacak şekilde oluşturuyor olacağız. Bu durumda broker restart olduğununda queue silinmiş olacak.

En: Exclusive: Contains information whether the queue will be used with other connections.

Tr: Exclusive: Kuyruğun başka connectionlar ile birlikte kullanıp kullanılmayacağı bilgisini içerir.

En: AutoDelete: It contains information about deleting the queue as the data sent to the queue passes to the consumer side.

Tr: AutoDelete: Kuyruğa gönderilen veri consumer tarafına geçmesi ile birlikte kuyruğun silinmesi ile ilgili bilgiyi içerir.

Docker install and run : 'docker run -d --hostname rabbit --name rabbit rabbitmq:3-management' (default username = 'guest', password = 'guest')

For Example fullcode github:

https://raw.githubusercontent.com/dgnoztrk/RabbitMqBasicExample/master/RabbitMqCustomer/Controllers/RabbitMqController.cs

--

--