Esempio n. 1
0
        public Consumer()
        {
            iFactoryProperty = new Service.FactoryProperty();

            consumerAgent = new Service.Consumer <L>();

            consumerAgent.FactoryProperty = (Service.FactoryProperty)iFactoryProperty;
        }
Esempio n. 2
0
        public Producer()
        {
            iFactoryProperty = new Service.FactoryProperty();

            producerAgent = new Service.Producer();

            producerAgent.FactoryProperty = (Service.FactoryProperty)iFactoryProperty;
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="accessKey"></param>
        /// <param name="secretKey"></param>
        /// <param name="producerId"></param>
        /// <param name="publishTopics"></param>
        /// <param name="nameSrvAddr"></param>
        /// <param name="logPath"></param>
        public Consumer(
            string accessKey,
            string secretKey,
            string producerId,
            string publishTopics,
            string nameSrvAddr,
            string logPath = @"d:\rocket-mq-log")
        {
            iFactoryProperty = new Service.FactoryProperty();
            iFactoryProperty.SetAccessKey(accessKey);
            iFactoryProperty.SetSecretKey(secretKey);
            iFactoryProperty.SetProducerId(producerId);
            iFactoryProperty.SetPublishTopic(publishTopics);
            iFactoryProperty.SetNameSrvAddr(nameSrvAddr);
            iFactoryProperty.SetLogPath(logPath);

            consumerAgent = new Service.Consumer <L>();

            consumerAgent.FactoryProperty = (Service.FactoryProperty)iFactoryProperty;
        }