Merge branch 'release/3.1.1' into develop
This commit is contained in:
commit
831f858ef5
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
// Neither of these are available in language version 7 required for .NET Standard 2.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using Microsoft.Data.SqlClient;
|
||||
|
||||
// ReSharper disable UnusedMember.Global
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Data.SqlClient;
|
||||
|
||||
namespace Tapeti.Flow.SQL
|
||||
{
|
||||
|
@ -33,7 +33,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -17,7 +17,7 @@ namespace Tapeti.Connection
|
||||
/// <summary>
|
||||
/// Implements the bridge between the RabbitMQ Client consumer and a Tapeti Consumer
|
||||
/// </summary>
|
||||
internal class TapetiBasicConsumer : AsyncDefaultBasicConsumer
|
||||
internal class TapetiBasicConsumer : DefaultBasicConsumer
|
||||
{
|
||||
private readonly IConsumer consumer;
|
||||
private readonly long connectionReference;
|
||||
@ -34,7 +34,7 @@ namespace Tapeti.Connection
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public override async Task HandleBasicDeliver(string consumerTag,
|
||||
public override void HandleBasicDeliver(string consumerTag,
|
||||
ulong deliveryTag,
|
||||
bool redelivered,
|
||||
string exchange,
|
||||
@ -50,6 +50,10 @@ namespace Tapeti.Connection
|
||||
// See also: https://github.com/JamesNK/Newtonsoft.Json/issues/1761
|
||||
var bodyArray = body.ToArray();
|
||||
|
||||
// Changing to AsyncDefaultBasicConsumer does not mean HandleBasicDeliver runs in parallel, the Task.Run would
|
||||
// still be necessary, which is why TapetiBasicConsumer is a DefaultBasicConsumer.
|
||||
Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = await consumer.Consume(exchange, routingKey, new RabbitMQMessageProperties(properties), bodyArray);
|
||||
@ -59,6 +63,7 @@ namespace Tapeti.Connection
|
||||
{
|
||||
await onRespond(connectionReference, deliveryTag, ConsumeResult.Error);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -777,8 +777,7 @@ namespace Tapeti.Connection
|
||||
Password = connectionParams.Password,
|
||||
AutomaticRecoveryEnabled = false,
|
||||
TopologyRecoveryEnabled = false,
|
||||
RequestedHeartbeat = TimeSpan.FromSeconds(30),
|
||||
DispatchConsumersAsync = true
|
||||
RequestedHeartbeat = TimeSpan.FromSeconds(30)
|
||||
};
|
||||
|
||||
if (connectionParams.ClientProperties != null)
|
||||
|
Loading…
Reference in New Issue
Block a user