Mx.Notifier.Consumer 1.0.4

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

// Install Mx.Notifier.Consumer as a Cake Tool
#tool nuget:?package=Mx.Notifier.Consumer&version=1.0.4

About

Mx.Notifier.Consumer is a C# library to help you setup a consumer for the MultiversX blockchain.

More documentation about Notifier service is available here Events notifier.

How to Use

// set these values correctly for your database server
var config = new RabbitConfig
{
    HostName = "server-hostname",
    QueueName = "queue-name",
    UserName = "username",
    Password = "Password",
    AutoAck = false,
};

// initialize your consumer
var initializer = new RabbitMqInitializer(config);

// Setup your custom code (ie: listen transaction of a specific smartcontract etc..)
initializer.MessageReceived += HandleCustomMessage;

// Consume
initializer.Initialize();


// Custom method
static void HandleCustomMessage(BlockEvent? blockEvent)
{
    var filteredEvent = blockEvent?.Events ?? Enumerable.Empty<Event>();


    if (filteredEvent.Any(x => !string.IsNullOrEmpty(x.Name)))
    {
        //Do something
    }

}

Feedback

Mx.Notifier.Consumer is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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 is compatible.  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. 
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 109 1/22/2024
1.0.3 69 1/22/2024
1.0.2 70 1/22/2024
1.0.1 80 1/18/2024
1.0.0 73 1/18/2024