0

I have created a hono connection for ditto using the POST method in postman. The connection is getting created but the connection is showing misconfigured in ditto. I have given below the connection json that I used to create.

{
    "name": "Hono-Demo",
    "connectionType": "hono",
    "connectionStatus": "open",
    "sources": [
        {
            "addresses": [
                "event"
            ],
            "consumerCount": 1,
            "qos": 0,
            "authorizationContext": [
                "nginx:ditto"
            ],
            "headerMapping": {},
            "payloadMapping": [
                "Ditto"
            ],
            "replyTarget": {
                "address": "kafka-Reply",
                "headerMapping": {},
                "expectedResponseTypes": [
                    "response",
                    "error"
                ],
                "enabled": true
            }
        }
    ],
 
    "targets": [
        {
            "address": "command",
            "topics": [
                "_/_/things/twin/events",
                "_/_/things/live/messages"
            ],
            "qos": 0,
            "authorizationContext": [
                "nginx:ditto"
            ],
            "headerMapping": {}
        }
    ],
    "clientCount": 1,
    "failoverEnabled": true,
    "validateCertificates": false,
    "processorPoolSize": 1,
    "specificConfig": {
        "saslMechanism": "plain"
    },
    "tags": []
}

And I have added this in connectivity conf file,

connectivity {
    hono {
    base-uri = tcp://localhost:9092
    username = honoUsername
    password = honoPassword
    sasl-mechanism = PLAIN
    bootstrap-servers= localhost:9092
    validate-certificates= false
    }

In documentation it is said that at runtime the uri will get inserted referring to conf file, but it's not getting inserted in my case. Can you tell me what I am doing wrong?.

Thank you!

0 Answers0