public void PushMessage(PhieuCanEntity message) { if (!_model.IsOpen) { this.ExchangeName = ConfigAccess.GetExchange(); this.RoutingKey = ConfigAccess.GetRoutingKey(); _model = Factory.CreateConnection().CreateModel(); } _model.BasicPublish(ExchangeName, RoutingKey, null, Serialize(message)); }
public SendData() { this.ExchangeName = ConfigAccess.GetExchange(); this.RoutingKey = ConfigAccess.GetRoutingKey(); _model = Factory.CreateConnection().CreateModel(); }