Exemple #1
0
        public NotificationProducer(string serverNameEndPoint, string channelName, string rootingKey, bool messagePersistent)
            : base(RabbitMQManager.GetRabbitMQServer(serverNameEndPoint), channelName, rootingKey, "")
        {
            this._queueName = _routingKey;
            ChannelDAL channelDAL = new ChannelDAL();

            if (!channelDAL.CheckChannelNameExist(channelName))
            {
                throw new Exception("Channel Name does not exist");
            }

            AddConnectionShutdownHandler(this.ConnectionShutdown);
            SetMessagePersitent(messagePersistent);
            try
            {
                var channel = GetChannel();
                //channel.ExchangeDeclare(_exchangeName, ExchangeType.Direct);
                CloseChannel(channel);
            }
            catch (Exception exception)
            {
                Logger.Error("Init producer error", exception);
                AsyncWaitAndReInitialize();
            }
        }
Exemple #2
0
 public static int ChannelIDSelByAbbre(string sAbbre)
 {
     return(ChannelDAL.ChannelIDSelByAbbre(sAbbre));
 }
Exemple #3
0
 public static decimal FeeScaleSel(string sAbbre)
 {
     return(ChannelDAL.FeeScaleSel(sAbbre));
 }
Exemple #4
0
 public static decimal FeeScaleSelByID(int channelid)
 {
     return(ChannelDAL.FeeScaleSelByID(channelid));
 }