Moryx.AbstractionLayer.Resources.Mqtt.Endpoints 10.10.1

dotnet add package Moryx.AbstractionLayer.Resources.Mqtt.Endpoints --version 10.10.1
                    
NuGet\Install-Package Moryx.AbstractionLayer.Resources.Mqtt.Endpoints -Version 10.10.1
                    
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="Moryx.AbstractionLayer.Resources.Mqtt.Endpoints" Version="10.10.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Moryx.AbstractionLayer.Resources.Mqtt.Endpoints" Version="10.10.1" />
                    
Directory.Packages.props
<PackageReference Include="Moryx.AbstractionLayer.Resources.Mqtt.Endpoints" />
                    
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 Moryx.AbstractionLayer.Resources.Mqtt.Endpoints --version 10.10.1
                    
#r "nuget: Moryx.AbstractionLayer.Resources.Mqtt.Endpoints, 10.10.1"
                    
#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 Moryx.AbstractionLayer.Resources.Mqtt.Endpoints@10.10.1
                    
#: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=Moryx.AbstractionLayer.Resources.Mqtt.Endpoints&version=10.10.1
                    
Install as a Cake Addin
#tool nuget:?package=Moryx.AbstractionLayer.Resources.Mqtt.Endpoints&version=10.10.1
                    
Install as a Cake Tool

ResourceRpcEndpoint

Endpoint to remote call a procedure/method on a resource.

  1. Setup :

    When run your project for the first time a configuration file will be generated inside the default MORYX Config folder. The content will be as follows:

    {
        "Id": "my-id",
        "Host": "localhost",
        "Port": 1883,
        "Username": "",
        "Password": "",
        "Tls": false,
        "QoS": "ExactlyOnce", // check the MqttQualityOfServiceLevel enum for more info
        "ReconnectDelayMs": 30000,
        "ReconnectWithClientSession": false,
        "RootTopic": ""
    }
    
    // Program.cs
    builder.Services.AddMqttClient().AddMqttEndpoints(); // <-- this add supports for the endpoints
    
  2. Available Endpoint topics :

    [root topic of the endpoint client]/resources/{identifier}/invoke/{methodName}, example: moryx/device-2/resources/123654/invoke/ChangeCapabilities

    If no root topic was configured the topic becomes resources/{identifier}/invoke/{methodName}, example: resources/123654/invoke/ChangeCapabilities

    If the method you are invoking has parameters, you should put the value of those parameters in your payload:

    // MyResource.cs
    //code..
    public void MyMethod(int testResult, string name)
    {
        //code..
    }
    //code..
    

    Given the previous method your json payload should look like the following:

    {
        "TestResult": 564,
        "Name": "DefaultName"
    }
    
  3. Response Topic :

    In MQTT v5+ you can specify a response topic in your message. If a response topic is present the endpoint will sent the response of the invocation to that topic. If a response topic was not defined the default response topic will have the structure resources/{identifier}/invoked/{methodName}. Here is an example: resources/123654/invoked/ChangeCapabilities

  4. Response Payload :

    If the method you are calling has a return value:

    // MyResource.cs
    //code..
    public int MyMethod(int testResult, string name)
    {
        //code..
        return 10;
    }
    //code..
    

    Given a method like above the endpoint will sent the result back to the client. The schema of the json payload will look like the following:

    {
        "Value": 10,
        "ValueType": 4 //  check EntryValueType for more infos
    }
    
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
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
10.10.1 93 8/24/2026
10.10.0 93 8/24/2026
10.9.1 108 8/8/2026
10.9.0 105 7/27/2026
10.8.0 118 7/10/2026
10.7.1 128 6/29/2026
10.7.0 118 6/29/2026
10.6.0 120 6/2/2026
10.5.0 107 5/18/2026
10.4.1 140 4/19/2026
10.4.0 115 4/5/2026
10.3.0 125 3/8/2026
10.2.0 132 2/25/2026