/// <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)); }
/// <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)); }
/// <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;