Replies: 1 comment 3 replies
-
Hi @neottil I just checked .. Unfortunately, the This is currently only used in: I however don't see why this should only be available for MQTT, would also make sense for other connections. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For the documentation is possible to configure enforcement input using placeholder {{ source:address }}. https://www.eclipse.org/ditto/3.2/basic-connections.html#source-enforcement
I try to configure Kafka connection like this:
{
"id": "glin_dl00001_prod-kafka-connection",
"name": null,
"connectionType": "kafka",
"connectionStatus": "open",
"uri": "tcp://kafka-service:9092",
"sources": [
{
"enforcement": {
"input": "{{ source:address }}",
"filters": "{{ thing:namespace }}.kafakinbound"
},
"addresses": [
"glin_dl00001_dev.kafkainbound",
"glin_dl00001_prod.kafkainbound"
],
"consumerCount": 1,
"qos": 0,
"authorizationContext": [
"device:glin_dl00001_prod"
],
"headerMapping": {
"content-type": "{{header:content-type}}",
"correlation-id": "{{header:correlation-id}}"
},
"replyTarget": {
"address": "{{thing:namespace}}.command.inbound/{{thing:namespace}}/{{thing:name}}",
"headerMapping": {
"content-type": "{{header:content-type}}",
"correlation-id": "{{header:correlation-id}}"
},
"expectedResponseTypes": [
"response",
"error"
],
"enabled": true
}
}
],
"targets": [
{
"address": "{{thing:namespace}}.command.inbound/{{thing:namespace}}/{{thing:name}}",
"topics": [
"//things/twin/events",
"//things/live/messages"
],
"qos": 0,
"authorizationContext": [
"nginx:user-pipeline"
],
"headerMapping": {}
}
],
"clientCount": 1,
"failoverEnabled": true,
"validateCertificates": true,
"processorPoolSize": 1,
"specificConfig": {
"bootstrapServers": "kafka-service:9092"
},
"tags": []
}
The response of connection API is:
{
"status": 400,
"error": "connectivity:connection.configuration.invalid",
"message": "The placeholder 'source:address' could not be resolved.",
"description": "Some placeholders could not be resolved. Check the spelling of the placeholder and make sure all required headers are set."
}
This is not supported for Kafka connections?
Beta Was this translation helpful? Give feedback.
All reactions