Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-18473

Knative component : CloudEvents have wrong time format

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.18.1
    • 3.18.3, 3.19.0
    • camel-knative
    • None
    • Unknown

    Description

       

      When trying camel knative component with InMemory channels, we can't see the bug because this one doesn't validate the event.

      Outside of this use case when the event is validated on knative, it seems that the time has wrong DateFormat. 

      For instance, if using the component with a broker, we can't produce an event with camel-knative, and this is the log in knative environment :

       

      {"level":"warn","ts":"2022-09-06T14:35:10.587Z","logger":"mt_broker_ingress","caller":"ingress/ingress_handler.go:137","msg":"failed to extract event from request","error":"invalid value for time: \"22022-08-31T12:00:33.253+02:00\""} 

      This is the valid DateFormat, according to [CloudEvents spec|https://github.com/cloudevents/spec]

       

       "time" : "2018-04-05T17:31:00Z", 

      This corresponds in the Java DateTimeFormatter class to ISO_INSTANT.

      However, in camel-knative producer uses ISO_OFFSET_DATE_TIME

       

       

       

      Attachments

        Activity

          People

            zbendhiba Zineb Bendhiba
            zbendhiba Zineb Bendhiba
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: