Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-15220

Salesforce Kamelet logs null attributes for subscribed topic in secret-based configuration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Minor Minor
    • camel-K-M3
    • camel-K-M3
    • Camel-K
    • None
    • False
    • False
    • % %
    • Undefined
    • Hide

      salesforce-source.groovy:

      from('kamelet:salesforce-source/sfconfig') 
        .to("log:info")

      sfconfig.properties:

      camel.kamelet.salesforce-source.sfconfig.loginUrl = https://login.salesforce.com 
      camel.kamelet.salesforce-source.sfconfig.userName = XX
      camel.kamelet.salesforce-source.sfconfig.password = XX
      camel.kamelet.salesforce-source.sfconfig.clientId = XX
      camel.kamelet.salesforce-source.sfconfig.clientSecret = XX
      camel.kamelet.salesforce-source.sfconfig.query= SELECT Id FROM Contact 
      camel.kamelet.salesforce-source.sfconfig.topicName = kamelet-topic1

       

      1. kubectl create secret generic salesforce-source.sfconfig --from-file=sfconfig.properties
      2. kubectl label secret salesforce-source.sfconfig camel.apache.org/kamelet=salesforce-source camel.apache.org/kamelet.conf
        iguration=sfconfig
      3. kamel run salesforce-source.groovy --dev
      Show
      salesforce-source.groovy: from( 'kamelet:salesforce-source/sfconfig' )  .to( "log:info" ) sfconfig.properties: camel.kamelet.salesforce-source.sfconfig.loginUrl = https: //login.salesforce.com camel.kamelet.salesforce-source.sfconfig.userName = XX camel.kamelet.salesforce-source.sfconfig.password = XX camel.kamelet.salesforce-source.sfconfig.clientId = XX camel.kamelet.salesforce-source.sfconfig.clientSecret = XX camel.kamelet.salesforce-source.sfconfig.query= SELECT Id FROM Contact camel.kamelet.salesforce-source.sfconfig.topicName = kamelet-topic1   kubectl create secret generic salesforce-source.sfconfig --from-file=sfconfig.properties kubectl label secret salesforce-source.sfconfig camel.apache.org/kamelet=salesforce-source camel.apache.org/kamelet.conf iguration=sfconfig kamel run salesforce-source.groovy --dev

      OCP 4.5, Camel-K #5

      With secret-based configuration, topic/channel is correctly created (checked in Salesforce Developer Console), but log of the integration contains null values for the topic's attributes:

      [1] 2020-10-28 22:01:01,321 INFO [org.apa.cam.com.sal.int.str.PushTopicHelper] (main) Creating Topic kamelet-topic1: {"attributes":{"referenceId":null,"type":null,"url":null},"Query":"SELECT Id FROM Contact","Description":"Topic created by Camel Salesforce component","ApiVersion":34.0,"NotifyForFields":"All","NotifyForOperationCreate":true,"NotifyForOperationDelete":false,"NotifyForOperationUndelete":false,"NotifyForOperationUpdate":false,"Name":"kamelet-topic1"}
      [1] 2020-10-28 22:01:06,755 INFO [org.apa.cam.com.sal.int.str.SubscriptionHelper] (main) Subscribing to channel /topic/kamelet-topic1...
      [1] 2020-10-28 22:01:06,760 INFO [org.apa.cam.imp.eng.InternalRouteStartupManager] (main) Route: sfconfig started and consuming from: wrap:salesforce:kamelet-topic1

              dbokde Dhiraj Bokde
              lfabriko@redhat.com Lucie Krejcirova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: