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

Hi, this sounds great, but we can't get it working here.

> 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.

What we are doing:
 - running the Dispatch Router using the Docker image
 - create a receiver at address: telemetry.myTenant
 - send a message with to property (no target address specified for the sender link): telementry.myTenant.4711

Last thing we see in the trace log is: 

←[36mqdrouter_1 | ←[0mWed Apr 27 11:43:24 2016 MESSAGE (trace) Received Message{to='telemetry.myTenant.4711' body='\a1\0545645'} on link auto-0

But it's not forwarded to the receiver. Should this work out-of-the-box? Or do we miss some further configuration? Maybe you have an idea what we are doing wrong?

Dominik

-----Original Message-----
From: hono-dev-bounces@xxxxxxxxxxx [mailto:hono-dev-bounces@xxxxxxxxxxx] On Behalf Of Gordon Sim
Sent: Wednesday, April 27, 2016 11:46 AM
To: hono-dev@xxxxxxxxxxx
Subject: 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/'?
_______________________________________________
hono-dev mailing list
hono-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/hono-dev


Back to the top