Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [hono-dev] Telemetry & Device Registration API

On 06/06/16 08:33, Hudalla Kai (INST/ESY1) wrote:
Hi,

Dominik and I have played around with the Qpid JMS client for AMQP 1.0
and came across the following issue:

The JMS API requires a client to create a MessageProducer by means of a
Session, e.g. by invoking Session.createProducer(Destination). If the
given Destination object is null, the client can use the producer to
send messages to arbitrary addresses. However, if the Destination is not
null, the client can use the producer only to send messages to the
Destination's address.

This is a problem with our current approach of using the "to" field of
an AMQP message to convey the tenant and device IDs (as opposed to
providing these values in separate header fields). We require Hono
clients to connect to Hono with a target address of e.g.
"/telemetry/${tenant-id}" in order to authorize the client for the given
tenant. However, if a JMS client uses Destination with this address for
creating the MessageProducer, it cannot set the address on messages sent
via this producer anymore (because the JMS spec explicitly prohibits this).

The way I see it, we can either drop the requirement to connect to Hono
with a target address indicating the endpoint and tenant or we need to
fall back to the client providing the tenant and device IDs in header
fields (again).

AFAIK I prefer the latter option because I think it would be unwise to
prevent clients to use JMS to connect to Hono (mainly because the only
reasonably usable AMQP 1.0 Java client seems to be Qpid JMS at the moment).

What do you think?

I agree with you. If full control over the 'to' field is not possible, it is better to use a custom field.

BTW we are facing the same problem with Hono's other API's as well, e.g. [1]

[1] https://github.com/eclipse/hono/issues/7




Back to the top