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.
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.
// Install Redi.APICommunication as a Cake Addin
#addin nuget:?package=Redi.APICommunication&version=1.0.4

// Install Redi.APICommunication as a Cake Tool
#tool nuget:?package=Redi.APICommunication&version=1.0.4

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. 
.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 555 3/16/2020
1.0.3.2 460 2/13/2020
1.0.3.1 480 2/11/2020
1.0.3 425 2/10/2020
1.0.2 520 1/16/2020
1.0.1 409 1/16/2020