Esempio n. 1
0
        /// <summary>生产消息</summary>
        /// <param name="topic">主题</param>
        /// <param name="messages">消息集合</param>
        /// <param name="option">消息选项</param>
        /// <returns></returns>
        public override Int32 Produce(String topic, String[] messages, MessageOption option = null)
        {
            if (topic.IsNullOrEmpty() || messages == null || messages.Length < 1)
            {
                return(0);
            }

            return(Ant.Produce(topic, messages, option));
        }
Esempio n. 2
0
        /// <summary>生产消息</summary>
        /// <param name="topic">主题</param>
        /// <param name="messages">消息集合</param>
        /// <param name="option">消息选项</param>
        /// <returns></returns>
        public Int32 Produce(String topic, String[] messages, MessageOption option = null)
        {
            var dic = new { topic, messages }.ToDictionary();

            if (option != null)
            {
                dic = dic.Merge(option);
            }

            return(Invoke <Int32>(nameof(Produce), dic));
        }
Esempio n. 3
0
 /// <summary>生产消息</summary>
 /// <param name="topic">主题</param>
 /// <param name="messages">消息集合</param>
 /// <param name="option">消息选项</param>
 /// <returns></returns>
 public virtual Int32 Produce(String topic, String[] messages, MessageOption option = null) => 0;