Uploaded image for project: 'Couchbase Kafka Connector'
  1. Couchbase Kafka Connector
  2. KAFKAC-252

we want to be able to have the instance id of the connector as property of SourceHandlerParams

ConnectUnexalate
    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 4.0.0
    • Labels:
      None
    • Story Points:
      1

      Attachments

        Issue Links

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          talavis tal avissar added a comment - - edited

          currently the instance id name of the connector is not passed to the SourceHandlerParams of the RawJsonSourceHandler

           

          We do see the connector instance name  in the CouchbaseSourceTask:

           public void start(Map<String, String> properties) {
                 this.connectorName = (String)properties.get("name");

           

          but it is not being passed to the SourceHandlerParams so we cant log it and passed it further down stream

           

          Show
          talavis tal avissar added a comment - - edited currently the instance id name of the connector is not passed to the SourceHandlerParams of the RawJsonSourceHandler   We do see the connector instance name  in the CouchbaseSourceTask:  public void start(Map<String, String> properties) {        this.connectorName = (String)properties.get("name");   but it is not being passed to the SourceHandlerParams so we cant log it and passed it further down stream  
          Hide
          david.nault David Nault added a comment -

          A custom SourceHandler can access the connector config properties by implementing SourceHandler.init(Map<String,String>). 

          https://github.com/couchbase/kafka-connect-couchbase/blob/c0d659b669e1080c796352654d77ef7c4c65f04d/src/main/java/com/couchbase/connect/kafka/handler/source/SourceHandler.java#L30

           

           

          Show
          david.nault David Nault added a comment - A custom SourceHandler can access the connector config properties by implementing SourceHandler.init(Map<String,String>).  https://github.com/couchbase/kafka-connect-couchbase/blob/c0d659b669e1080c796352654d77ef7c4c65f04d/src/main/java/com/couchbase/connect/kafka/handler/source/SourceHandler.java#L30    
          Show
          david.nault David Nault added a comment - The `CustomSourceHandler` example has been updated to show how to read the config property.   https://github.com/couchbase/kafka-connect-couchbase/blob/788bf352eed1a52c449bdd3d456913bdc295087f/examples/custom-extensions/src/main/java/com/couchbase/connect/kafka/example/CustomSourceHandler.java#L44

            People

            Assignee:
            david.nault David Nault
            Reporter:
            talavis tal avissar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  Sync Status

                  Connection: Jira Server_to_Jira Cloud

                    PagerDuty