SmartTender.MessageBroker.NetFramework 1.0.10

dotnet add package SmartTender.MessageBroker.NetFramework --version 1.0.10
NuGet\Install-Package SmartTender.MessageBroker.NetFramework -Version 1.0.10
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="SmartTender.MessageBroker.NetFramework" Version="1.0.10" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SmartTender.MessageBroker.NetFramework --version 1.0.10
#r "nuget: SmartTender.MessageBroker.NetFramework, 1.0.10"
#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 SmartTender.MessageBroker.NetFramework as a Cake Addin
#addin nuget:?package=SmartTender.MessageBroker.NetFramework&version=1.0.10

// Install SmartTender.MessageBroker.NetFramework as a Cake Tool
#tool nuget:?package=SmartTender.MessageBroker.NetFramework&version=1.0.10

Smarttender.MessageBroker.NetFramework NuGet Package

Installation

To use this package, you can install it via NuGet Package Manager or directly add it to your project's dependencies in the .csproj file.

dotnet add package Smarttender.MessageBroker.NetFramework

Usage

Dependency Injection method

public static class SmartMessageBrokerServicesDi
{
    // Adding required services to the service collection
    public static void AddSmartMessageBroker(this NinjectModule services, string connectionString, Action<BrokerConfig> configureRecievers = null, string customAppName = null);

    // Starting consuming queues
    public static StandardKernel UseSmartMessageBrokerConsumers(this StandardKernel app);
}

DI Registration Examples

Run consumers in startup.cs

		private void configureWebApi(IAppBuilder app)
		{
			var modules = new INinjectModule[]
			{
				new NinjectRegistrations(),
				new ProZorroSaleModules.DalModule(),
				new ProZorroSaleModules.ApiModule(),
				new ProZorroSaleModules.AppModule(),
				new ProZorroSaleModules.ReportingDalModule(),
				new ProZorroSaleModules.DalElasticModule(),
				new ProZorroSaleModules.DalNewDbModule(),
				new ProZorroSaleModules.ReportingModule(),
				new HangfireNinjectModule(),
				new WebApiNinjectRegistrations()
			};
			var settings = new NinjectSettings
			{
				InjectNonPublic = true,
			};
			var kernel = new StandardKernel(settings, modules);
			var config = new HttpConfiguration
			{
				DependencyResolver = new WebApiNinjectDependencyResolver(kernel),
				IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always
			};
			config.Formatters.Remove(config.Formatters.JsonFormatter);
			config.Formatters.Insert(0, new SanitizingJsonMediaTypeFormatter());
			config.Formatters.JsonFormatter.SerializerSettings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
			//config.MessageHandlers.Add(new LanguageMessageHandlerWebApi());
			config.MessageHandlers.Add(new LogWebApiHandler());
			config.MessageHandlers.Add(new ProZorroSaleApiLogHandler());
			config.MapHttpAttributeRoutes();
			config.Filters.Add(new ApiFilterAttribute());
			config.Filters.Add(new GlobalApiFilterAttribute());
			app.UseWebApi(config);
			ProzorroSaleSwaggerConfig.Register(config);
			runProZorroSaleSockets(kernel);
			kernel.UseSmartMessageBrokerConsumers();
			//configureWebApiThrottling(config);
		}

Run consumers in startup.cs


public class NinjectRegistrations : NinjectModule
{
	public override void Load()
	{
		//....
		this.AddSmartMessageBroker("amqps://your-rabbitmq-url", 
			x =>
			{
				x.AddConsumer<FeatureUsingMessageConsumer, FeatureUsingMessage>();
			}, customAppName: "WebTender");
	}
}

Replace "amqps://your-rabbitmq-url" with your actual RabbitMQ connection string.

Target frameworks

net462

Dependencies

  • Smarttender.MessageBroker (latest)
  • Microsoft.AspNet.Mvc 5.2.7
  • Ninject 3.3.4
  • System.Text.Json 5.0.2
Product Compatible and additional computed target framework versions.
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
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.10 100 4/29/2024
1.0.9 79 4/29/2024
1.0.8 76 4/25/2024
1.0.7 72 4/25/2024
1.0.6 77 4/25/2024
1.0.5 75 4/25/2024
1.0.4 81 4/24/2024
1.0.3 88 4/23/2024
1.0.2 87 4/23/2024