Redi.APICommunication 1.0.4

dotnet add package Redi.APICommunication --version 1.0.4
                    
NuGet\Install-Package Redi.APICommunication -Version 1.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Redi.APICommunication" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Redi.APICommunication" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Redi.APICommunication" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Redi.APICommunication --version 1.0.4
                    
#r "nuget: Redi.APICommunication, 1.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Redi.APICommunication@1.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Redi.APICommunication&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Redi.APICommunication&version=1.0.4
                    
Install as a Cake Tool

Documentation of Redi.APICommunication

This package helps for API communication in multi-service architecture.

It involves 5 levels for configuration:

Level 1:

Add connection to configuration/appsettings file

"rabbit": {

    "UserName": "guest",
    
    "Password": "guest",
    
    "HostName": "localhost",
    
    "VHost": "/",
    
    "Port": 4000

}

Level 2:

public  void ConfigureServices(IServiceCollection services)
{    
    // Configure Rabbit settings.    
    services.AddRabbit(Configuration);    
}

Level 3:

The thought process of RabbitMQ is pubsub.

The subscriber class will inherit from RabbitSubcriberBase

public  class  RouteRabbitScriber : RabbitSubcriberBase
{
    public  RouteRabbitScriber(IApplicationBuilder builder):base(builder)
    {
	   
	 }
		
	public override Subscribe(){
		this.RabbitManager.Subscribe<RouteDTO>(“queueName”, (model) =>
		{
		// perform your update there using the model
		});
		
	}
}

Level 4:

Register the subscriber class with rabbit engine.

 public  void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {        
        app.RegisterRabbitSubscriber<RouteRabbitScriber, IDeviceCommandRepository>();        
    }

Level 5:

The publisher need to have the object of the rabbitManager

public  RoutesController(IRabbitManager rabbitmanager)
{
    this.rabbitmanager = rabbitmanager;    
}

// PUT: api/Routes/5    
   [HttpPut("{id}")]    
   public  async Task<int> Put(Guid id, [FromBody] RouteDTO value)    
   {    
    // Do your updte here    
    rabbitmanager.Publish<RouteDTO>(value, “queueName”, null);    
    //return your object;    
   }
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4 736 3/16/2020
1.0.3.2 630 2/13/2020
1.0.3.1 649 2/11/2020
1.0.3 589 2/10/2020
1.0.2 685 1/16/2020
1.0.1 569 1/16/2020