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

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

Closed
wants to merge 1 commit into from

Conversation

matzew
Copy link
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
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

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

@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!

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
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
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

Whats the status of this PR?

@matzew
Copy link
Member Author

matzew commented Apr 4, 2019 via email

@hanoisteve
Copy link

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

@bluemonk3y
Copy link

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

@powturns
Copy link

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
Contributor

Solved in the PR #49

Let's close this?

@matzew
Copy link
Member Author

matzew commented Sep 25, 2019 via email

@fabiojose
Copy link
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