Ejemplo n.º 1
0
        /// <summary>
        /// MQ发布
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button19_Click(object sender, EventArgs e)
        {
            #region
            //try
            //{
            //    IConnectionFactory factory = new ConnectionFactory("tcp://*****:*****@"test message";
            //            producer.Send(message, Apache.NMS.MsgDeliveryMode.NonPersistent, Apache.NMS.MsgPriority.Normal, TimeSpan.MinValue);
            //        }
            //    }
            //}
            //catch (Exception ex)
            //{
            //    throw ex;
            //}
            #endregion

            string ods_t2001_flg_cs = "[{\"change_before\":\"\",\"change_after\":\"C\",\"mq_send_time \":\"2016-08-101:12:00\",\"commit_time\":\"2016-08-04 10:10:29.0\",\"flight_id\":\"1249761\"}]";
            helper.ProduceTopicMessage("ods_t2001_flg_cs", ods_t2001_flg_cs, MsgDeliveryMode.NonPersistent, MsgPriority.Normal);

            string ods_flight_new = "[{\"mq_send_time\":\"2016-08-10 11:12:00\",\"commit_time\":\"2016-08-04 10:10:29.0\",\"flight_id\":\"1249761\"}]";
            helper.ProduceTopicMessage("ods_flight_new", ods_flight_new, MsgDeliveryMode.NonPersistent, MsgPriority.Normal);

            string ods_flight_update = "[{\"mq_send_time\":\"2016-08-10 11:12:00\",\"change_columns\":\"vip@@fpl_div_airport1@@fpl_div_airport2\",\"commit_time\":\"2016-08-04 10:10:29.0\",\"flight_id\":\"1249761\"}]";
            helper.ProduceTopicMessage("ods_flight_update", ods_flight_update, MsgDeliveryMode.NonPersistent, MsgPriority.Normal);
        }