Пример #1
0
        public async Task QueueMessage(string queuename, object data, string correlationId = null)
        {
            QueueMessage qm = new QueueMessage(queuename);

            qm.data          = data;
            qm.correlationId = correlationId;
            qm = await qm.SendMessage <QueueMessage>(this);

            if (!string.IsNullOrEmpty(qm.error))
            {
                throw new Exception(qm.error);
            }
        }
Пример #2
0
        public async Task <object> QueueMessage(string queuename, object data, string replyto, string correlationId, int expiration)
        {
            QueueMessage qm = new QueueMessage(queuename);

            qm.expiration    = expiration;
            qm.data          = data; qm.replyto = replyto;
            qm.correlationId = correlationId;
            qm = await qm.SendMessage <QueueMessage>(this);

            if (!string.IsNullOrEmpty(qm.error))
            {
                throw new Exception(qm.error);
            }
            return(qm.data);
        }