public BigBubbleClient(Publisher publisher, Consumer consumer, IUsernameProvider usernameProvider, IConfiguration config, IRmqConnectionFactory connectionFactory) { _publisher = publisher; _consumer = consumer; _consumer.MessageReceived += Consumer_MessageReceived; _usernameProvider = usernameProvider; _connectionFactory = connectionFactory; }
public Publisher(IRmqConnectionFactory connectionFactory, IUsernameProvider username) { _publishChannel = connectionFactory.GetPublishChannel(); _queueName = _publishChannel.QueueDeclare().QueueName; _publishChannel.QueueBind(queue: _queueName, exchange: "chat_fnt", routingKey: ""); _basicProperties = _publishChannel.CreateBasicProperties(); _basicProperties.Persistent = true; _basicProperties.Headers = new Dictionary <string, object>(); //_basicProperties.Headers.Add("nickname", username.GetUsername()); }
public Consumer(IRmqConnectionFactory connectionFactory, IUsernameProvider username) { _consumerChannel = connectionFactory.GetPublishChannel(); _username = username; }