// bunch [connectionparams, queue] () private void AddConnection(TaskQueue.Providers.QueueConnectionParameters qcp) { //qcp.QueueTypeName = qI.QueueType; //qcp.QueueInstance = qI; MessageChannels.AddConnection(qcp); }
public ChannelAnteroom GetAnteroom(string name) { ChannelAnteroom anteroom = null; if (Anterooms.TryGetValue(name, out anteroom)) { return(anteroom); } else { MessageChannel mc = GetInstanceByName(name); anteroom = new ChannelAnteroom(); anteroom.ChannelName = name; TaskQueue.Providers.QueueConnectionParameters qparams = Connections[mc.ConnectionName]; anteroom.Queue = qparams.QueueInstance; //anteroom.Queue = (TaskQueue.ITQueue)Activator.CreateInstance(qparams.QueueInstance.GetType()); //Queues.GetQueue(mc.QueueName); try { anteroom.Queue.InitialiseFromModel(new RepresentedModel(typeof(TaskMessage)), qparams);// schema free only queue providers (mongodb) // set selector to queue anteroom.Queue.SetSelector(mc.consumerSelector); } catch (QueueConnectionException e) { logger.Warning(e.Message); } catch (Exception e) { logger.Exception(e, "Anterooms.Add", "anteroom initialisation error"); } Anterooms.Add(name, anteroom); return(anteroom); } return(null); }
public void InitialiseFromModel(RepresentedModel model, QueueConnectionParameters connection) { this.m = model; }
public void AddConnection(QueueConnectionParameters conParameters) { Connections.Add(conParameters.Name, conParameters); }
public MemQueue(RepresentedModel model, QueueConnectionParameters connection) { this.InitialiseFromModel(model, connection); Name = connection.Name; }
public void Add(QueueConnectionParameters qcp) { MessageModels.Add(qcp); }
public void InitialiseFromModel(RepresentedModel model, QueueConnectionParameters connection) { this.model = model; this.connection = connection; SetSelector(TQItemSelector.DefaultFifoSelector); MongoQueueParams mongoparams = connection.specParams as MongoQueueParams; try { OpenConnection(mongoparams); } catch (Exception e) { throw new QueueConnectionException("can't open connection to: " + mongoparams.ConnectionString, e); } }