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

            _messageProducer.Send(textMessage);

            return(textMessage.NMSMessageId);
        }
Beispiel #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);
        }