Exemplo n.º 1
0
        public string Publish(string topic, IDictionary <string, string> messageBody)
        {
            var textMessage = CreateTextMessage(TextMessageUtil.CreateMessage(topic, messageBody));

            _messageProducer.Send(textMessage);

            return(textMessage.NMSMessageId);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Publish to the message to the supplied topic.
        ///
        /// </summary>
        /// <param name="topic"></param>
        /// <param name="fieldName"></param>
        /// <param name="fieldValue"></param>
        public string Publish(string topic, string fieldName, string fieldValue)
        {
            var textMessage = CreateTextMessage(TextMessageUtil.CreateMessage(topic, fieldName, fieldValue));

            _messageProducer.Send(textMessage);

            return(textMessage.NMSMessageId);
        }