Skip to content

Commit

Permalink
Merge branch 'main' into 1047-expose-addfunction-api-cesql
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelvillard authored Jun 4, 2024
2 parents d84424e + cbba3fd commit 2c125d7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
5 changes: 3 additions & 2 deletions protocol/kafka_confluent/v2/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ import (
"strconv"
"strings"

"github.com/confluentinc/confluent-kafka-go/v2/kafka"

"github.com/cloudevents/sdk-go/v2/binding"
"github.com/cloudevents/sdk-go/v2/binding/format"
"github.com/cloudevents/sdk-go/v2/binding/spec"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

const (
prefix = "ce-"
prefix = "ce_"
contentTypeKey = "content-type"
)

Expand Down
32 changes: 16 additions & 16 deletions protocol/kafka_confluent/v2/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ var (
TopicPartition: topicPartition,
Value: []byte("hello world!"),
Headers: mapToKafkaHeaders(map[string]string{
"ce-type": testEvent.Type(),
"ce-source": testEvent.Source(),
"ce-id": testEvent.ID(),
"ce-time": test.Timestamp.String(),
"ce-specversion": "1.0",
"ce-dataschema": test.Schema.String(),
"ce-datacontenttype": "text/json",
"ce-subject": "receiverTopic",
"ce_type": testEvent.Type(),
"ce_source": testEvent.Source(),
"ce_id": testEvent.ID(),
"ce_time": test.Timestamp.String(),
"ce_specversion": "1.0",
"ce_dataschema": test.Schema.String(),
"ce_datacontenttype": "text/json",
"ce_subject": "receiverTopic",
"exta": "someext",
}),
}
Expand Down Expand Up @@ -89,14 +89,14 @@ func TestNewMessage(t *testing.T) {
TopicPartition: topicPartition,
Value: nil,
Headers: mapToKafkaHeaders(map[string]string{
"ce-type": testEvent.Type(),
"ce-source": testEvent.Source(),
"ce-id": testEvent.ID(),
"ce-time": test.Timestamp.String(),
"ce-specversion": "1.0",
"ce-dataschema": test.Schema.String(),
"ce-datacontenttype": "text/json",
"ce-subject": "receiverTopic",
"ce_type": testEvent.Type(),
"ce_source": testEvent.Source(),
"ce_id": testEvent.ID(),
"ce_time": test.Timestamp.String(),
"ce_specversion": "1.0",
"ce_dataschema": test.Schema.String(),
"ce_datacontenttype": "text/json",
"ce_subject": "receiverTopic",
}),
},
expectedEncoding: binding.EncodingBinary,
Expand Down

0 comments on commit 2c125d7

Please sign in to comment.