Skip to content

update messaging lib to fix RMQ connection issues #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions doc/dependency_decisions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -815,14 +815,14 @@
- :who: mocsharp
:why: Apache-2.0 (https://github.com/Project-MONAI/monai-deploy-messaging/raw/main/LICENSE)
:versions:
- 0.1.5
- 0.1.6
:when: 2022-08-16 23:06:21.051573547 Z
- - :approve
- Monai.Deploy.Messaging.RabbitMQ
- :who: mocsharp
:why: Apache-2.0 (https://github.com/Project-MONAI/monai-deploy-messaging/raw/main/LICENSE)
:versions:
- 0.1.5
- 0.1.6
:when: 2022-08-16 23:06:21.511789690 Z
- - :approve
- Monai.Deploy.Storage
Expand Down Expand Up @@ -2377,4 +2377,3 @@
:versions:
- 4.0.1
:when: 2022-08-16 23:10:21.184627612 Z

12 changes: 6 additions & 6 deletions docs/compliance/third-party-licenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -7286,14 +7286,14 @@ Apache License


<details>
<summary>Monai.Deploy.Messaging 0.1.5</summary>
<summary>Monai.Deploy.Messaging 0.1.6</summary>

## Monai.Deploy.Messaging

- Version: 0.1.5
- Version: 0.1.6
- Authors: MONAI Consortium
- Project URL: https://github.com/Project-MONAI/monai-deploy-messaging
- Source: [NuGet](https://www.nuget.org/packages/Monai.Deploy.Messaging/0.1.5)
- Source: [NuGet](https://www.nuget.org/packages/Monai.Deploy.Messaging/0.1.6)
- License: [Apache-2.0](https://github.com/Project-MONAI/monai-deploy-messaging/raw/main/LICENSE)


Expand Down Expand Up @@ -7514,14 +7514,14 @@ By downloading this software, you agree to the license terms & all licenses list


<details>
<summary>Monai.Deploy.Messaging.RabbitMQ 0.1.5</summary>
<summary>Monai.Deploy.Messaging.RabbitMQ 0.1.6</summary>

## Monai.Deploy.Messaging.RabbitMQ

- Version: 0.1.5
- Version: 0.1.6
- Authors: MONAI Consortium
- Project URL: https://github.com/Project-MONAI/monai-deploy-messaging
- Source: [NuGet](https://www.nuget.org/packages/Monai.Deploy.Messaging.RabbitMQ/0.1.5)
- Source: [NuGet](https://www.nuget.org/packages/Monai.Deploy.Messaging.RabbitMQ/0.1.6)
- License: [Apache-2.0](https://github.com/Project-MONAI/monai-deploy-messaging/raw/main/LICENSE)


Expand Down
2 changes: 1 addition & 1 deletion src/Api/Monai.Deploy.InformaticsGateway.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</PackageReference>
<PackageReference Include="Macross.Json.Extensions" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="6.0.9" />
<PackageReference Include="Monai.Deploy.Messaging" Version="0.1.5" />
<PackageReference Include="Monai.Deploy.Messaging" Version="0.1.6" />
<PackageReference Include="Monai.Deploy.Storage" Version="0.2.7" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.2" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="Monai.Deploy.Messaging" Version="0.1.5" />
<PackageReference Include="Monai.Deploy.Messaging" Version="0.1.6" />
<PackageReference Include="Monai.Deploy.Storage" Version="0.2.7" />
<PackageReference Include="System.IO.Abstractions" Version="17.2.3" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="Monai.Deploy.Messaging.RabbitMQ" Version="0.1.5" />
<PackageReference Include="Monai.Deploy.Messaging.RabbitMQ" Version="0.1.6" />
<PackageReference Include="Monai.Deploy.Storage" Version="0.2.7" />
<PackageReference Include="Monai.Deploy.Storage.MinIO" Version="0.2.7" />
<PackageReference Include="Polly" Version="7.2.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ internal class PayloadNotificationActionHandler : IPayloadNotificationActionHand
private readonly IOptions<InformaticsGatewayConfiguration> _options;

private readonly IServiceScope _scope;
private readonly IMessageBrokerPublisherService _messageBrokerPublisherService;
private bool _disposedValue;

public PayloadNotificationActionHandler(IServiceScopeFactory serviceScopeFactory,
Expand All @@ -58,7 +57,6 @@ public PayloadNotificationActionHandler(IServiceScopeFactory serviceScopeFactory
_options = options ?? throw new ArgumentNullException(nameof(options));

_scope = _serviceScopeFactory.CreateScope();
_messageBrokerPublisherService = _scope.ServiceProvider.GetService<IMessageBrokerPublisherService>() ?? throw new ServiceNotFoundException(nameof(IMessageBrokerPublisherService));
}

public async Task NotifyAsync(Payload payload, ActionBlock<Payload> notificationQueue, CancellationToken cancellationToken = default)
Expand Down Expand Up @@ -134,7 +132,8 @@ private async Task NotifyPayloadReady(Payload payload)

_logger.PublishingWorkflowRequest(message.MessageId);

await _messageBrokerPublisherService.Publish(
var messageBrokerPublisherService = _scope.ServiceProvider.GetService<IMessageBrokerPublisherService>() ?? throw new ServiceNotFoundException(nameof(IMessageBrokerPublisherService));
await messageBrokerPublisherService.Publish(
_options.Value.Messaging.Topics.WorkflowRequest,
message.ToMessage()).ConfigureAwait(false);

Expand Down
2 changes: 1 addition & 1 deletion src/InformaticsGateway/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"storage": {
"settings": {
"endpoint": "localhost",
"endpoint": "localhost:9000",
"accessKey": "minioadmin",
"accessToken": "minioadmin",
"securedConnection": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="Minio" Version="4.0.5" />
<PackageReference Include="Monai.Deploy.Messaging.RabbitMQ" Version="0.1.5" />
<PackageReference Include="Monai.Deploy.Messaging.RabbitMQ" Version="0.1.6" />
<PackageReference Include="Monai.Deploy.Storage.MinIO" Version="0.2.7" />
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="Polly" Version="7.2.3" />
Expand Down