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

Sending a batch of CloudEvents fails because source, type and id are (legitimately) empty #604

Closed
antoineco opened this issue Oct 27, 2020 · 3 comments

Comments

@antoineco
Copy link
Contributor

antoineco commented Oct 27, 2020

Sending the following payload:

Context Attributes,
  specversion: 1.0
  type:
  source:
  id:
  datacontenttype: application/cloudevents-batch+json
Data,
  [
    {
      "datacontenttype": "application/json",
      "id": "2e7c3514-ca09-414c-8d85-4b821f2f54db",
      "source": "arn:aws:sqs:eu-central-1:043455440429:antoineco",
      "specversion": "1.0",
      "subject": "AIDAQUHRFMYWSR2PNVTVZ",
      "type": "com.amazon.sqs.message",
      "data": {
        "Attributes": {
          "ApproximateFirstReceiveTimestamp": "1603832160600",
          "ApproximateReceiveCount": "1",
          "SenderId": "AIDAQUHRFMYWSR2PNVTVZ",
          "SentTimestamp": "1603832160599"
        },
        "Body": "payload",
        "MD5OfBody": "7594406d9b2893a8ec1bb2d53ce50fbc",
        "MD5OfMessageAttributes": null,
        "MessageAttributes": null,
        "MessageId": "2e7c3514-ca09-414c-8d85-4b821f2f54db",
        "ReceiptHandle": "AQEBAOpznC6oBR91VbnjNLv5fE29Y8SUGK5MzpvyzFx0UNTPeHXkGhLf47Fp2b5MTVeBx7PAU8szcoolUdXDr0w/QRj65IFCjA0X8ftltv2mjkqhyjcCVpC7JlgZMCg/HOr6kZxZWHm1LyOhUcGVA1oyG5kRA8YUQO95Sml8A/0sDqLT/1iQE4wshlUIFxbwSvjFBeKRhuXPGsyXG31OKy8tPDzqI+Q/eh3wZG1Owib1RgWzk0T2taKmK0fYwxfD6IsPmB3RH1637rot6yc6SfZruthYEB7n1kOLrd2uwhrYpg3QcXctKTDkPe9WQKB9HW8cGHDLKWuU4No7lJPQpfeEnuxFELtlKGI1eIpkN69J/jtjBHWmCoqO3H43y98M+iikO4LUIu+Dst7sM/Q3oqWfJg=="
      }
    },
    {
      "datacontenttype": "application/json",
      "id": "250d3eb6-234b-496f-8ff0-1d4392d50ed9",
      "source": "arn:aws:sqs:eu-central-1:043455440429:antoineco",
      "specversion": "1.0",
      "subject": "AIDAQUHRFMYWSR2PNVTVZ",
      "type": "com.amazon.sqs.message",
      "data": {
        "Attributes": {
          "ApproximateFirstReceiveTimestamp": "1603832160602",
          "ApproximateReceiveCount": "1",
          "SenderId": "AIDAQUHRFMYWSR2PNVTVZ",
          "SentTimestamp": "1603832160600"
        },
        "Body": "payload",
        "MD5OfBody": "7594406d9b2893a8ec1bb2d53ce50fbc",
        "MD5OfMessageAttributes": null,
        "MessageAttributes": null,
        "MessageId": "250d3eb6-234b-496f-8ff0-1d4392d50ed9",
        "ReceiptHandle": "AQEBAutqePFPOOvAebD7GMGvanhGl7aTWSIZCMRxDYZbmSAYUtMX1t7wTuBpmwTqMM6D8YfYVGm06lRPATAvMB00ZVj/UFVL4xVclgPAsHiaDIgjVi9wB3le+NVXdKaI684G9+2wh47gtzvQ0bf/nwRlvPPWKedSsJdL5WQybTSZ/UIqevHSqvaMednIDYGm4qEeovxJixN7WQvwEZreUqPb6GWD/fMsLpQxe8rA1NgDK60o/lX1qgUecv1H/hdCfexwWNKEdl0euJ4DdChy4Wfy3Ze/fgdEQJxZ8m4mKaul70d46VFG+ulGw6gkRJIyv2EJawyjiLteAs3JOdO7KTSKa1pbPWUAtvBMBSPgDCkYG/16JboTIn5jTbrIE4M1gQf5dlUtjPI6ojJwi+PgGNd9KA=="
      }
    }
  ]

causes the client's Send() method to return the following error:

source: REQUIRED
type: MUST be a non-empty string
@antoineco
Copy link
Contributor Author

facepalm this is purely related to Knative. Moving the issue there.

@antoineco antoineco changed the title Sending a batch of CloudEvents makes the SDK panic with a nil pointer dereference Sending a batch of CloudEvents fails because source, type and id are (legitimately) empty Oct 27, 2020
@antoineco
Copy link
Contributor Author

Reopening with an updated title and error in the description.

@slinkydeveloper
Copy link
Member

There is no support at the moment for batch mode, please look at #301

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

2 participants