Comments (4)
The Eclipse IoT Packages project provides a connection template showing a possible connection configuration to connect to Hono via Kafka:
https://github.com/eclipse/packages/blob/master/packages/cloud2edge/post-install/hono-kafka-connection.json
This should be a good starting point.
Apart from that there is plenty of documentation to explore.
from ditto.
hi @thjaeckle,
thanks for pointing me to the document, i have followed the document and deployed the c2e package on the AKS, and try out the examples mentioned in that, but i was unable to create a new connection between hono and ditto, i have try both amqp and kafka based connection setting, none of them works.
problem:
-
AMQP as mentioned in doc (dispatch-router container is not created i have follow the this link to install c2e https://www.eclipse.org/packages/packages/cloud2edge/installation/)
curl -i -X POST -u devops:${DITTO_DEVOPS_PWD} -H 'Content-Type: application/json' --data '{
"targetActorSelection": "/system/sharding/connection",
"headers": {
"aggregate": false
},
"piggybackCommand": {
"type": "connectivity.commands:createConnection",
"connection": {
"id": "hono-connection-for-'"${HONO_TENANT}"'",
"connectionType": "amqp-10",
"connectionStatus": "open",
"uri": "amqp://consumer%40HONO:verysecret@'"${RELEASE}"'-dispatch-router-ext:15672",
"failoverEnabled": true,
"sources": [
{
"addresses": [
"telemetry/'"${HONO_TENANT}"'",
"event/'"${HONO_TENANT}"'"
],
"authorizationContext": [
"pre-authenticated:hono-connection"
],
"enforcement": {
"input": "{{ header:device_id }}",
"filters": [
"{{ entity:id }}"
]
},
"headerMapping": {
"hono-device-id": "{{ header:device_id }}",
"content-type": "{{ header:content-type }}"
},
"replyTarget": {
"enabled": true,
"address": "{{ header:reply-to }}",
"headerMapping": {
"to": "command/'"${HONO_TENANT}"'/{{ header:hono-device-id }}",
"subject": "{{ header:subject | fn:default(topic:action-subject) | fn:default(topic:criterion) }}-response",
"correlation-id": "{{ header:correlation-id }}",
"content-type": "{{ header:content-type | fn:default('"'"'application/vnd.eclipse.ditto+json'"'"') }}"
},
"expectedResponseTypes": [
"response",
"error"
]
},
"acknowledgementRequests": {
"includes": [],
"filter": "fn:filter(header:qos,'"'"'ne'"'"','"'"'0'"'"')"
}
},
{
"addresses": [
"command_response/'"${HONO_TENANT}"'/replies"
],
"authorizationContext": [
"pre-authenticated:hono-connection"
],
"headerMapping": {
"content-type": "{{ header:content-type }}",
"correlation-id": "{{ header:correlation-id }}",
"status": "{{ header:status }}"
},
"replyTarget": {
"enabled": false,
"expectedResponseTypes": [
"response",
"error"
]
}
}
],
"targets": [
{
"address": "command/'"${HONO_TENANT}"'",
"authorizationContext": [
"pre-authenticated:hono-connection"
],
"topics": [
"//things/live/commands",
"//things/live/messages"
],
"headerMapping": {
"to": "command/'"${HONO_TENANT}"'/{{ thing:id }}",
"subject": "{{ header:subject | fn:default(topic:action-subject) }}",
"content-type": "{{ header:content-type | fn:default('"'"'application/vnd.eclipse.ditto+json'"'"') }}",
"correlation-id": "{{ header:correlation-id }}",
"reply-to": "{{ fn:default('"'"'command_response/'"${HONO_TENANT}"'/replies'"'"') | fn:filter(header:response-required,'"'"'ne'"'"','"'"'false'"'"') }}"
}
},
{
"address": "command/'"${HONO_TENANT}"'",
"authorizationContext": [
"pre-authenticated:hono-connection"
],
"topics": [
"//things/twin/events",
"//things/live/events"
],
"headerMapping": {
"to": "command/'"${HONO_TENANT}"'/{{ thing:id }}",
"subject": "{{ header:subject | fn:default(topic:action-subject) }}",
"content-type": "{{ header:content-type | fn:default('"'"'application/vnd.eclipse.ditto+json'"'"') }}",
"correlation-id": "{{ header:correlation-id }}"
}
}
]
}
}
}' http://${DITTO_API_IP}:${DITTO_API_PORT_HTTP}/devops/piggyback/connectivity -
Kafka based connection:
i have trying deploying the ditto as docker container, also as helm package, also with c2e package. in all the cases, whenever i try to create a kafka connection using connectivity api and piggyback command. connectivity containers starts to crashs in loop. there is no recovery for it.
can you please help me out with it.?
from ditto.
There is an update, I have modified the yaml file. Now I have able to create a connection between hono and ditto using amqp.
but if I send the data from the device to hono it is not reflecting in ditto.
from ditto.
Please provide the logs of Ditto's connectivity
container. This should give an insight in the potential configuration errors.
from ditto.
Related Issues (20)
- MQTT messages sent when connectivity service was stopped are not processed HOT 2
- Resolving imported policies in Ditto's "things-search" does not use a cache to load same policy HOT 1
- Steps for increasing the maximum size for paging HOT 3
- Update Ditto to run with Java 21 runtime
- Helm: incorrect deploy order in 3.5.0 helm chart
- When using Policy Imports, the Ditto search index might lose Data with Ditto 3.5.0
- commands to device HOT 2
- Retrieving JSON arrays via `fields` selector is broken in Ditto 3.5.1 HOT 3
- Helm chart: Update MongoDB chart dependency to 13.x (MongoDB 6) HOT 4
- Ensure the consistency of signal enrichment for connections HOT 1
- In internal Ditto pub/sub, don't only filter for `authorizationSubject`, but also to subscribed `namespaces`
- Question regarding scalability in Ditto HOT 3
- mutiple ditto instance HOT 3
- Behavior of search/things API when 'indexedFieldsLimiting' feature is enabled HOT 1
- Header placeholders could not be resolved in connection HOT 2
- EndPoint HOT 7
- Incorrect template for sudo modifyPolicy piggybackCommand body HOT 2
- What is the Incoming script for sending multiple signal from the device(via mqtt connection) to the different path in the things? HOT 9
- Cannot retrieve entity at revision HOT 2
- Things UI in ditto HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ditto.