/// <inheritdoc /> public bool Create(LiteDbConnectionManager connection, LiteDbMessageQueueTransportOptions options, TableNameHelper helper) { using (var db = connection.GetDatabase()) { var col = db.Database.GetCollection <MetaDataTable>(helper.MetaDataName); col.EnsureIndex(x => x.Id); col.EnsureIndex(x => x.QueueId, true); if (options.EnableStatus) { col.EnsureIndex(x => x.Status); } if (options.EnableMessageExpiration) { col.EnsureIndex(x => x.ExpirationTime); } if (options.EnableHeartBeat) { col.EnsureIndex(x => x.HeartBeat); } if (options.EnableRoute) { col.EnsureIndex(x => x.Route); } return(true); } }
public VerifyQueueRecordCount(string queueName, string connectionString, LiteDbMessageQueueTransportOptions options, ICreationScope scope) { _options = options; _connection = new LiteDbConnectionInformation(new QueueConnection(queueName, connectionString)); _tableNameHelper = new TableNameHelper(_connection); _scope = scope; }
public VerifyQueueData(QueueConnection queueConnection, LiteDbMessageQueueTransportOptions options, ICreationScope scope) { _options = options; _connection = new LiteDbConnectionInformation(queueConnection); _tableNameHelper = new TableNameHelper(_connection); _scope = scope; }
/// <inheritdoc /> public bool Create(LiteDbConnectionManager connection, LiteDbMessageQueueTransportOptions options, TableNameHelper helper) { var db = connection.GetDatabase(); { var col = db.Database.GetCollection <QueueTable>(helper.QueueName); //indexed by Id col.EnsureIndex(x => x.Id); return(true); } }
/// <inheritdoc /> public bool Create(LiteDbConnectionManager connection, LiteDbMessageQueueTransportOptions options, TableNameHelper helper) { using (var db = connection.GetDatabase()) { var col = db.Database.GetCollection <MetaDataErrorsTable>(helper.MetaDataErrorsName); col.EnsureIndex(x => x.Id); col.EnsureIndex(x => x.QueueId, true); return(true); } }
/// <inheritdoc /> public bool Create(LiteDbConnectionManager connection, LiteDbMessageQueueTransportOptions options, TableNameHelper helper) { using (var db = connection.GetDatabase()) { var col = db.Database.GetCollection <ErrorTrackingTable>(helper.ErrorTrackingName); col.EnsureIndex(x => x.Id); col.EnsureIndex(x => x.QueueId, false); //multiple exceptions per record are possible return(true); } }
/// <summary> /// Creates new instance. /// </summary> /// <returns></returns> public LiteDbMessageQueueTransportOptions Create() { if (string.IsNullOrEmpty(_connectionInformation.ConnectionString)) { return(new LiteDbMessageQueueTransportOptions()); } if (_options != null) { return(_options); } lock (_creator) { if (_options == null) { _options = _queryOptions.Handle(new GetQueueOptionsQuery <LiteDbMessageQueueTransportOptions>()); } if (_options == null) //does not exist in DB; return a new copy. This will be saved to the database when the queue is created. { _options = new LiteDbMessageQueueTransportOptions(); } } return(_options); }