/// <summary>
        ///
        /// </summary>
        /// <param name="host"></param>
        /// <param name="userName"></param>
        /// <param name="pwd"></param>
        /// <param name="loger"></param>
        public TracingRecordRabbitmq(string host, string userName, string pwd, ILoger loger = null)
        {
            Raven.Rpc.Tracing.Record.RabbitMQ.Options rabbitMQOptions = new Options();
            rabbitMQOptions.SerializerType = SerializerType.NewtonsoftJson;
            rabbitMQOptions.HostName       = host;
            rabbitMQOptions.UserName       = userName;
            rabbitMQOptions.Password       = pwd;
            rabbitMQOptions.Loger          = loger;

            rabbitMQClient = RabbitMQClient.GetInstance(rabbitMQOptions);
        }
Exemple #2
0
        public RabbitMQClientManager()
        {
            RabbitMQConfig rabbitMQConfig = new RabbitMQConfig("RabbitMQ_RavenLogs");

            rabbitMQOptions = new Raven.MessageQueue.WithRabbitMQ.Options()
            {
                SerializerType = SerializerType.NewtonsoftJson,
                HostName       = rabbitMQConfig.hostName,
                Password       = rabbitMQConfig.password,
                UserName       = rabbitMQConfig.username,
                //MaxQueueCount = 100000,
                Loger = new Loger()
            };
            rabbitMQClient = RabbitMQClient.GetInstance(rabbitMQOptions);
        }