edgent-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dale LaBossiere (JIRA)" <j...@apache.org>
Subject [jira] [Created] (EDGENT-403) Wish IotDevice.events() exposed support for byte[] payloads
Date Wed, 29 Mar 2017 13:03:41 GMT
Dale LaBossiere created EDGENT-403:

             Summary: Wish IotDevice.events() exposed support for byte[] payloads
                 Key: EDGENT-403
                 URL: https://issues.apache.org/jira/browse/EDGENT-403
             Project: Edgent
          Issue Type: Wish
          Components: Connectors
            Reporter: Dale LaBossiere
            Priority: Minor

I had an application that wanted to publish device events having a byte[] payload.  In this
case it wanted to publish a png image.  

I worked around the issue by MIME (base64) encoding the image and then having that string
as an attribute in the JsonObject to publish.  Of course the encoding utilized some additional
CPU cycles and increased the payload size a bit.

MQTT supports publishing a byte[].   Edgent's {{MqttStreams.publish()}} exposes that. {{IotDevice.events()}}
does not, hence neither does Edgent's {{MqttDevice}}.  WIoTP supports byte[] payloads. Edgent's
{{IotpDevice}} doesn't expose that capability.

Suggest adding something along the lines of:
IotDevice.events(TStream<T> stream, Function<T, String> topic, Function<T,
byte[]> payload, Function<T, String> format, Function<T, int> qos)

and enhancing MqttDevice and IotpDevice accordingly, as well as IotGateway and IotpGateway.

This message was sent by Atlassian JIRA

View raw message