Exemple #1
0
        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());
        }
Exemple #2
0
 public Consumer(IRmqConnectionFactory connectionFactory, IUsernameProvider username)
 {
     _consumerChannel = connectionFactory.GetPublishChannel();
     _username        = username;
 }