/monai-deploy-messaging

MONAI Deploy communication system between clinical data pipelines components

Primary LanguageC#Apache License 2.0Apache-2.0

project-monai

💡 If you want to know more about MONAI Deploy WG vision, overall structure, and guidelines, please read MONAI Deploy first.

MONAI Deploy Messaging

License codecov ci Nuget

The MONAI Deploy Messaging library for MONAI Deploy clinical data pipelines system enables users to extend the system to external message broker services by implementing the IMessageBrokerPublisherService and IMessageBrokerSubscriberService APIs. The APIs allow the users to plug in any other message broker services, such as Apache Kafka and Azure Service Bus.

Currently supported message broker services:

* Services provided may not be free or requires special license agreements. Please refer to the service providers' website for additional terms and conditions.

If you would like to use a message broker service not listed above, please file an issue and contribute to the repository.


Installation

1. Configure the Service

To use the MONAI Deploy Messaging library, install the NuGet.Org package and call the AddMonaiDeployMessageBrokerSubscriberService(...) and/or the AddMonaiDeployMessageBrokerPublisherService(...) method to register the dependencies:

Host.CreateDefaultBuilder(args)
    .ConfigureServices((hostContext, services) =>
    {
        ...
        // Register the subscriber service
        services.AddMonaiDeployMessageBrokerSubscriberService(hostContext.Configuration.GetSection("InformaticsGateway:messaging:publisherServiceAssemblyName").Value);

        // Register the publisher service
        services.AddMonaiDeployMessageBrokerPublisherService(hostContext.Configuration.GetSection("InformaticsGateway:messaging:subscriberServiceAssemblyName").Value);
        ...
    });

2. Install the Plug-in

  1. Create a subdirectory named plug-ins in the directory where your main application is installed.
  2. Download the zipped plug-in of your choice and extract the files to the plug-ins directory.
  3. Update appsettings.json and set the publisherServiceAssemblyName and the subscriberServiceAssemblyName, e.g.:
     "messaging": {
       "publisherServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessagePublisherService, Monai.Deploy.Messaging.RabbitMQ",
       "publisherSettings": {
         ...
       },
       "subscriberServiceAssemblyName": "Monai.Deploy.Messaging.RabbitMQ.RabbitMQMessageSubscriberService, Monai.Deploy.Messaging.RabbitMQ",
       "subscriberSettings": {
         ...
       }
     },

3. Restrict Acess to the Plug-ins Directory

To avoid tampering of the plug-ins, it is recommended to set access rights to the plug-ins directory.


Releases

The MONAI Deploy Messaging library is released in NuGet format, which is available on both NuGet.Org and GitHub.

Official Builds

Official builds are made from the main branch.

RC Builds

Release candidates are built and released from the release/* branches.

Development Builds

Development builds are made from all branches except the main branch and the release/* branches. The NuGet packages are released to GitHub only.

Contributing

For guidance on contributing to MONAI Deploy Messaging, see the contributing guidelines.

Join the conversation on Twitter @ProjectMONAI or join our Slack channel.

Ask and answer questions over on MONAI Deploy Messaging's GitHub Discussions tab.

License

Copyright (c) MONAI Consortium. All rights reserved. Licensed under the Apache-2.0 license.

This software uses the Microsoft .NET 6.0 library, and the use of this software is subject to the Microsoft software license terms.

By downloading this software, you agree to the license terms & all licenses listed on the third-party licenses page.

Links