Beispiel #1
0
		private void Send (IModel model, IMessage msg)
		{
			string finalName = model.QueueDeclare (QRef.Queue, true);
			IMessageBuilder mb = helper.WriteMessage (model, msg);

			model.BasicPublish ("", finalName,
			                    (IBasicProperties) mb.GetContentHeader(),
			                    mb.GetContentBody ());
		}
Beispiel #2
0
        public void Send(QueueReference qRef, IMessage message)
        {
            IModel _model = Model;

            string          finalName = _model.QueueDeclare(qRef.Queue, false);
            IMessageBuilder mb        = helper.WriteMessage(_model, message);

            model.BasicPublish("", finalName,
                               (IBasicProperties)mb.GetContentHeader(),
                               mb.GetContentBody());
        }