Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [hono-dev] Redundant(?) properties in API messages

On 27/04/16 10:15, Hudalla Kai (INST/ESY1) wrote:
HI,

following up on the addressing scheme we started to discuss yesterday, we now seem to run into some (current) limitations of the Dispatch Router.

Assume a protocol adapter that sends a telemetry message to Hono using e.g. the following address for the message's "to" field: telemetry/myTenant/myDevice
Hono will extract the tenant and device from the address and add the "tenant-id" and "device-id" message annotations to the message and then forward the message to the Dispatch Router.

An application that wants to receive all telemetry data for tenant "myTenant" would create a receiver link with the Dispatch Router using source address "telemetry/myTenant". It seems that the Dispatch Router (currently?) has no way of configuring it to route all messages having an address starting with "telemetry/myTenant" to a receiver with a matching link source address, or does it?.

@Gordon: Are we missing something here? Can the Dispatch Router be configured to support this (yet)?

In 0.6.0-beta2, the delimiter for 'words' is the dot character, i.e. '.'. Since then there has been a change to recognise both '.' and '/', which will be part of the next beta or release candidate.

Without that change, you could subscribe to telemetry.myTenant and get messages sent to telemetry.myTenant.aDevice, but that would not work if replaceing the '.' with a '/'. However that should soon be addressed.

The other way to handle it is to use a sender per tenant in the hono 'proxy'. I.e. send messages over a sender with target telemetry/myTenant, and have the to field set to telemetry/myTenant/aDevice. (In this case the to field will not be used for routing at present). If you don't want to allow per device subscription, this would work fine.

On a sidenote: if we want to support assuming a DEFAULT_TENANT then we also need to make sure that the Dispatch Router understands this semantics as well, i.e. if an application creates a receiver with source address "telemetry/" then it must make sure that the application gets all messages having an address starting with "telemetry/DEFAULT_TENANT". Again, I have no clue if and how the Dispatch Router can support this ...

It cannot support that. In the case there is a default tenant, would that be the *only* tenant?

Can the hono proxy send the message to 'telemetry/'?


Back to the top