Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The pre-release salesforce source connector, the received messages are in the format that different from Salesforce document. #1290

Closed
milkchocolate opened this issue Nov 16, 2021 · 2 comments

Comments

@milkchocolate
Copy link

milkchocolate commented Nov 16, 2021

Hi team,

When I use the salesforce source connector, the received messages are in the format below

{
   "schema":{
      "type":"bytes",
      "optional":false
   },
   "payload":"eyJMYXN0TW9kaWZpZWREYXRlIjoiMjAyMS0xMS0xNlQwNzozMjoxMC4wMDBaIiwiV2luX1Byb2JhYmlsaXR5X19jIjozMC4wfQ=="
}

The base64 decoded payload

{
   "LastModifiedDate":"2021-11-16T07:32:10.000Z",
   "Win_Probability__c":30.0
}

This Salesforce document says the messages are in the format below, when I use the example connector from the Salesforce document, I can receive messages in that format. How can I get other fields back if I use the pre-release Camel Salesforce Source Connector?
https://trailhead.salesforce.com/en/content/learn/modules/change-data-capture/subscribe-to-events

{
  "schema": "-pszPCNGMHqUPU1ftkjxEA",
  "payload": {
    "LastModifiedDate": "2019-09-25T20:38:11.000Z",
    "ChangeEventHeader": {
      "commitNumber": 65840825286,
      "commitUser": "005RM000001vI4mYAE",
      "sequenceNumber": 1,
      "entityName": "Employee__c",
      "changeType": "UPDATE",
      "changedFields": [
        "LastModifiedDate",
        "First_Name__c",
        "Tenure__c"
      ],
      "changeOrigin": "com/salesforce/api/soap/47.0;client=SfdcInternalAPI/",
      "transactionKey": "00051d4a-7640-5b8c-c6d1-b8db4ce4cf2f",
      "commitTimestamp": 1569443892000,
      "recordIds": [
        "a00RM0000004ICTYA2"
      ]
    },
    "First_Name__c": "Trish",
    "Tenure__c": 3.0
  },
  "event": {
    "replayId": 15054
  }
}
@hakidehari
Copy link

hakidehari commented Feb 15, 2022

In your config, do you have rawPayload set to true? Also, what type of event is this: a platform event or a change data capture event? You may also have to disable schemas.enable.

@aonamrata
Copy link

if you are like me and end up to this issue and still face the same error, refer https://github.com/apache/camel-kafka-connector/issues/1587#issue-2093156908 for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants