hono icon indicating copy to clipboard operation
hono copied to clipboard

Parameterizing MQTT adapter

Open BobClaerhout opened this issue 6 years ago • 0 comments

I think most of the protocol adapters will almost be identical to an existing one. For example, the actility thingpark LoraWan network sends data to the MQTT adapter on topic "accountPrefix/things/deviceEUI/uplink" and expects control commands on topic "accountPrefix/things/deviceEUI/downlink". It consists of the same functional data as the hono topics except for the path segments to be ordered differently. I had a brief look into the code and I think changes are limited to:

  • ResourceIdentifier, make IDX parameterizable:
    • private static final int IDX_ENDPOINT = 0;
    • private static final int IDX_TENANT_ID = 1;
    • private static final int IDX_RESOURCE_ID = 2;
  • EndpointType:
    • parameterize the constants

BobClaerhout avatar Feb 04 '19 09:02 BobClaerhout