eclipse-ditto / ditto

Eclipse Ditto™: Digital Twin framework of Eclipse IoT - main repository

Home Page:https://eclipse.dev/ditto/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some questions about custom Java implementations in Connectivity service

xinbusiqq opened this issue · comments

hi,
I am using a custom Java implementation to handle payload mapping and I extends AbstractMessageMapper.
Sometimes Thing are related to each other and I need to search for other Thing, how can I do that?
Also can I get modification notifications for other Thing?

Hi @xinbusiqq

Sometimes Thing are related to each other and I need to search for other Thing, how can I do that?

Unfortunately, that is not possible. Payload mappings in Ditto are sandboxed quite strictly and there is no functionality (yet) to lookup things during a payload mapping.

Also can I get modification notifications for other Thing?

I don't understand that question, what is the problem you are facing here?

hi,
Using Java jar package is it also running in sandbox?
My application scenario is like this, the OBU device is installed on the vehicle and sends vehicle location information, I have created a new Vehicle-Thing and OBU-Thing and I need to update the vehicle location information to the Vehicle-Thing. So I need to query the related Vehicle-ThingId set on the OBU-Thing using the deviceId reported by the OBU.
Also, I want to be notified when the relation between OBU and vehicle has been changed.
I need some help with this.

Using Java jar package is it also running in sandbox?

Ah, you're right - with a Java based payload mapper you should be able to do anything - e.g. calling the Ditto HTTP API in order to lookup another thing.
But keep in mind that payload mappings should not take long, as that would limit the throughput of message processing heavily.