using VCommon.Logging;

namespace VCommon.PubSub
{
    public class Publisher : PubSubBase
    {
        public Publisher(string server, string channelName) : base(server, channelName)
        {
        }

        protected void Publish(string message)
        {
            Logger.Trace($"{nameof(PubSub)}:{nameof(Publish)}", new { ChannelName, message });
            Conn.GetSubscriber().Publish(ChannelName, message);
        }
    }
}
