@@ -105,10 +105,6 @@ namespace DotNetCore.CAP.MongoDB | |||||
var collection = _database.GetCollection<CapReceivedMessage>(_options.ReceivedCollection); | var collection = _database.GetCollection<CapReceivedMessage>(_options.ReceivedCollection); | ||||
collection.InsertOne(message); | collection.InsertOne(message); | ||||
} | |||||
public void Dispose() | |||||
{ | |||||
} | |||||
} | |||||
} | } | ||||
} | } |
@@ -109,10 +109,6 @@ VALUES(@Id,@Name,@Group,@Content,@Retries,@Added,@ExpiresAt,@StatusName);"; | |||||
{ | { | ||||
return connection.Execute(sql) > 0; | return connection.Execute(sql) > 0; | ||||
} | } | ||||
} | |||||
public void Dispose() | |||||
{ | |||||
} | |||||
} | |||||
} | } | ||||
} | } |
@@ -47,9 +47,7 @@ namespace DotNetCore.CAP.PostgreSql | |||||
} | } | ||||
var sql = | var sql = | ||||
$@"UPDATE ""{ | |||||
_schema | |||||
}"".""received"" SET ""Retries""=@Retries,""Content""= @Content,""ExpiresAt""=@ExpiresAt,""StatusName""=@StatusName WHERE ""Id""=@Id;"; | |||||
$@"UPDATE ""{_schema}"".""received"" SET ""Retries""=@Retries,""Content""= @Content,""ExpiresAt""=@ExpiresAt,""StatusName""=@StatusName WHERE ""Id""=@Id;"; | |||||
_dbConnection.Execute(sql, message, _dbTransaction); | _dbConnection.Execute(sql, message, _dbTransaction); | ||||
} | } | ||||
@@ -34,7 +34,6 @@ namespace Microsoft.Extensions.DependencyInjection | |||||
} | } | ||||
services.TryAddSingleton<CapMarkerService>(); | services.TryAddSingleton<CapMarkerService>(); | ||||
services.Configure(setupAction); | |||||
//Consumer service | //Consumer service | ||||
AddSubscribeServices(services); | AddSubscribeServices(services); | ||||
@@ -34,12 +34,9 @@ | |||||
<PackageReference Include="Consul" Version="0.7.2.6" /> | <PackageReference Include="Consul" Version="0.7.2.6" /> | ||||
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.1.0" /> | <PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.1.0" /> | ||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.0" /> | <PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.Options" Version="2.1.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.0" /> | <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.0" /> | ||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" /> | <PackageReference Include="Newtonsoft.Json" Version="11.0.2" /> | ||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.5.0" /> | <PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.5.0" /> | ||||
<PackageReference Include="System.Threading.ThreadPool" Version="4.3.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.0" /> | <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.0" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -1,7 +1,6 @@ | |||||
// Copyright (c) .NET Core Community. All rights reserved. | // Copyright (c) .NET Core Community. All rights reserved. | ||||
// Licensed under the MIT License. See License.txt in the project root for license information. | // Licensed under the MIT License. See License.txt in the project root for license information. | ||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using DotNetCore.CAP.Models; | using DotNetCore.CAP.Models; | ||||
@@ -11,7 +10,7 @@ namespace DotNetCore.CAP | |||||
/// <summary> | /// <summary> | ||||
/// Represents a connection to the storage. | /// Represents a connection to the storage. | ||||
/// </summary> | /// </summary> | ||||
public interface IStorageConnection : IDisposable | |||||
public interface IStorageConnection | |||||
{ | { | ||||
//Sent messages | //Sent messages | ||||
@@ -4,7 +4,6 @@ | |||||
using System; | using System; | ||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using Microsoft.Extensions.DependencyInjection; | using Microsoft.Extensions.DependencyInjection; | ||||
using Microsoft.Extensions.Options; | |||||
namespace DotNetCore.CAP.Processor | namespace DotNetCore.CAP.Processor | ||||
{ | { | ||||
@@ -16,13 +15,13 @@ namespace DotNetCore.CAP.Processor | |||||
private readonly TimeSpan _waitingInterval; | private readonly TimeSpan _waitingInterval; | ||||
public NeedRetryMessageProcessor( | public NeedRetryMessageProcessor( | ||||
IOptions<CapOptions> options, | |||||
CapOptions options, | |||||
ISubscriberExecutor subscriberExecutor, | ISubscriberExecutor subscriberExecutor, | ||||
IPublishMessageSender publishMessageSender) | IPublishMessageSender publishMessageSender) | ||||
{ | { | ||||
_subscriberExecutor = subscriberExecutor; | _subscriberExecutor = subscriberExecutor; | ||||
_publishMessageSender = publishMessageSender; | _publishMessageSender = publishMessageSender; | ||||
_waitingInterval = TimeSpan.FromSeconds(options.Value.FailedRetryInterval); | |||||
_waitingInterval = TimeSpan.FromSeconds(options.FailedRetryInterval); | |||||
} | } | ||||
public async Task ProcessAsync(ProcessingContext context) | public async Task ProcessAsync(ProcessingContext context) | ||||