Skip to content

Commit b8e255d

Browse files
authored
Merge branch 'master' into dev
2 parents 4a22ad1 + 87604ec commit b8e255d

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/dotnetcore.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
# Optionally strip `v` prefix
2727
strip_v: true
2828
- name: Set VERSION variable from tag
29-
run: echo ${{steps.tag.outputs.tag}}
29+
run: echo ${{steps.tag.outputs.tag}}
3030
- name: Build with dotnet
3131
run: dotnet build --configuration Release src/RabbitMQ.EventBus.AspNetCore
3232
- name: Pack
33-
run: dotnet pack src/RabbitMQ.EventBus.AspNetCore -c Release --include-symbols --include-source -p:PackageVersion=3.1.$GITHUB_RUN_NUMBER -o artifacts/
33+
run: dotnet pack src/RabbitMQ.EventBus.AspNetCore -c Release --include-symbols --include-source -p:PackageVersion=5.0.$GITHUB_RUN_NUMBER -o artifacts/
3434
- name: Publish Symbols to NuGet
3535
run: dotnet nuget push artifacts/*.symbols.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

RabbitMQ.EventBus.AspNetCore.Sample/Controllers/ValuesController.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@ public async Task<ActionResult<string>> Get()
2424
// Body = "rabbitmq.eventbus.test=>发送消息",
2525
// Time = DateTimeOffset.Now
2626
//}, exchange: "RabbitMQ.EventBus.Simple", routingKey: "rabbitmq.eventbus.test");
27-
for (int i = 0; i < 100; i++)
27+
28+
for (int i = 0; i < 1000; i++)
2829
{
2930
_eventBus.Publish(new
3031
{
31-
Body = "rabbitmq.eventbus.test1=>发送消息",
32+
Body = $"rabbitmq.eventbus.test1=>发送消息/t{i}",
3233
Time = DateTimeOffset.Now,
3334
}, exchange: "RabbitMQ.EventBus.Simple", routingKey: "rabbitmq.eventbus.test1");
35+
await Task.Yield();
36+
await Task.Delay(500);
3437
}
3538
return "Ok";
3639
}

src/RabbitMQ.EventBus.AspNetCore/DefaultRabbitMQEventBus.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public void Publish<TMessage>(TMessage message, string exchange, string routingK
5454
string body = message.Serialize();
5555
using var _publishChannel = _persistentConnection.ExchangeDeclare(exchange, type: type);
5656
_publishChannel.BasicReturn += async (se, ex) => await Task.Delay((int)_persistentConnection.Configuration.ConsumerFailRetryInterval.TotalMilliseconds).ContinueWith(t => Publish(body, ex.Exchange, ex.RoutingKey));
57+
5758
IBasicProperties properties = _publishChannel.CreateBasicProperties();
5859
properties.DeliveryMode = 2; // persistent
5960
_publishChannel.BasicPublish(exchange: exchange,

0 commit comments

Comments
 (0)