This file contains 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 characters
using RabbitMQ.Client; | |
using RabbitMQ.Client.Events; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Consumer.Repositories | |
{ | |
public class ConsumerRepository | |
{ |
This file contains 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 characters
using RabbitMQ.Client; | |
using System.Text; | |
namespace Producer.Repositories | |
{ | |
public class ProducerRepository | |
{ | |
public void SellProduct(string productName) | |
{ | |
var service = new ConnectionService(); |
This file contains 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 characters
public class ConnectionService | |
{ | |
public IConnection RabbitMQConnection() | |
{ | |
ConnectionFactory connection = new ConnectionFactory() | |
{ | |
HostName = "rabbitmq", | |
UserName = "test", | |
Password = "test", | |
Port = 5672, |
This file contains 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 characters
version: "3.5" | |
services: | |
##41021 | |
rabbitmq: | |
image: "rabbitmq:3-management" | |
hostname: "rabbitmq" | |
container_name: rabbitmq | |
environment: |