Last active
January 8, 2022 10:27
-
-
Save hkucuk/e547614e766a2d852101f239e10c1a54 to your computer and use it in GitHub Desktop.
Revisions
-
hkucuk revised this gist
Jan 8, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ var factory = new ConnectionFactory(); //AMQP URL factory.Uri = new Uri("amqps://fxunuiqu:url_adres"); var queueName = "test-queue"; using (var connection = factory.CreateConnection()) -
hkucuk renamed this gist
Jan 8, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
hkucuk revised this gist
Jan 8, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ using RabbitMQ.Client; var factory = new ConnectionFactory(); //AMQP URL factory.Uri = new Uri("amqps://fxunuiqu:your_url"); var queueName = "test-queue"; using (var connection = factory.CreateConnection()) -
hkucuk revised this gist
Jan 8, 2022 . No changes.There are no files selected for viewing
-
hkucuk created this gist
Jan 8, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ using System.Text; using RabbitMQ.Client; var factory = new ConnectionFactory(); //AMQP URL factory.Uri = new Uri("amqps://fxunuiqu:AKyj5ShMAw-AmH3InEBx6G_lQov-Cofs@puffin.rmq2.cloudamqp.com/fxunuiqu"); var queueName = "test-queue"; using (var connection = factory.CreateConnection()) { var channel = connection.CreateModel(); channel.QueueDeclare ( queue: queueName, durable: true, //true degeri kuyruk bellekte oluşturulmasın ve fiziksel olarak kaydedilsin anlamina gelir. exclusive: false,//false degeri kuyruga sadece olsuturuldugu makineden degil heryerden baglanılabilsin anlamina gelir. autoDelete: false //false degeri istemcilerin işi bittiğinde kuyruk otomatik olarak silinmesin anlamina gelir. ); for (int i = 0; i < 50; i++) { var data = Encoding.UTF8.GetBytes($"{i}. mesaj : {Guid.NewGuid()}"); channel.BasicPublish ( exchange: "", routingKey: queueName, mandatory: true, basicProperties: null, body: data ); Console.WriteLine($"{i}. mesaj gönderildi."); } } Console.WriteLine("Mesaj Gönderildi"); Console.Read();