Skip to content

WIP: Adding initial support for some simple Kafka "mapping#26

Closed
matzew wants to merge 1 commit into
cloudevents:masterfrom
matzew:kafka
Closed

WIP: Adding initial support for some simple Kafka "mapping#26
matzew wants to merge 1 commit into
cloudevents:masterfrom
matzew:kafka

Conversation

@matzew
Copy link
Copy Markdown
Member

@matzew matzew commented Dec 12, 2018

Signed-off-by: Matthias Wessendorf mwessend@redhat.com

support for Apache Kafka, as discussed here #5
and here: cloudevents/spec#337

First POC, @bluemonk3y - with some tests ... more to come, and to polished

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
final Map<K, V> rawKafkaRecord = new HashMap();
rawKafkaRecord.put(record.key(), record.value());
builder.data(rawKafkaRecord);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: I am not using an "event key" here - instead, I put the key/value pair to the DATA

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really need to revolve eventKey use. @matzew - can you jump on the eventKey PR discussion where we can discuss further?

Copy link
Copy Markdown

@sjwoodman sjwoodman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

case DEFAULT: return new V02HttpTransportMappers();
}

// you should not be here!
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤣

builder.data(rawKafkaRecord);

// we hard wire to this type:
builder.contentType("application/kafka"); // todo: move to constant
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it mean to have a content type of "application/kafka"? Isn't the transport an orthogonal concern to the content type?

builder.contentType("application/kafka"); // todo: move to constant

} catch (Exception e) {
e.printStackTrace();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better raise it?

@tarunrathor-pro
Copy link
Copy Markdown

Whats the status of this PR?

@matzew
Copy link
Copy Markdown
Member Author

matzew commented Apr 4, 2019 via email

@hanoisteve
Copy link
Copy Markdown

Great news! btw, is this branch also version 0.3 compliant?

@bluemonk3y
Copy link
Copy Markdown

btw - I have been investigating how to implement the Kafka transport binding properly, it may use part of this PR.

@powturns
Copy link
Copy Markdown

Any updates on this PR? It seems like KafkaTransportHeaders is out of sync with the current spec documented https://github.com/cloudevents/spec/blob/master/kafka-transport-binding.md (using cloudEvent_ as a prefix rather than ce_

@fabiojose
Copy link
Copy Markdown
Contributor

Solved in the PR #49

Let's close this?

@matzew
Copy link
Copy Markdown
Member Author

matzew commented Sep 25, 2019 via email

@fabiojose
Copy link
Copy Markdown
Contributor

Available in version 0.3.0

@fabiojose fabiojose closed this Sep 30, 2019
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

Successfully merging this pull request may close these issues.

8 participants