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

Added event class MskFirehoseEvent.java for Firehose Lambda transformation when MSK is the source #490

Merged
merged 28 commits into from
Jul 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ec8dca0
Create MskFirehoseEvent.java
ShashankAWS Jul 1, 2024
7df3645
Update MskFirehoseEvent.java
ShashankAWS Jul 1, 2024
f6f4a60
Update MskFirehoseEvent.java
ShashankAWS Jul 1, 2024
51b2640
Update MskFirehoseEvent.java
ShashankAWS Jul 1, 2024
7d689bb
Update README.md
ShashankAWS Jul 1, 2024
eb08bbe
Update and rename MskFirehoseEvent.java to MSKFirehoseEvent.java
ShashankAWS Jul 1, 2024
5eb7042
Create MSKFirehoseResponse.java
ShashankAWS Jul 2, 2024
a720f87
Create msk_firehose_event.json
ShashankAWS Jul 2, 2024
df1e0e4
Create MSKFirehoseEventHandler.java
ShashankAWS Jul 2, 2024
57a9a81
Create MSKFirehoseEventHandlerTest.java
ShashankAWS Jul 2, 2024
5ba689e
Create event.json
ShashankAWS Jul 2, 2024
f240a62
Update README.md
ShashankAWS Jul 2, 2024
5abcb06
Update MSKFirehoseEventHandler.java
ShashankAWS Jul 3, 2024
f29f105
Update MSKFirehoseEventHandler.java
ShashankAWS Jul 3, 2024
24e1b10
Update MSKFirehoseEventHandlerTest.java
ShashankAWS Jul 3, 2024
feec28f
Update MSKFirehoseEvent.java
ShashankAWS Jul 3, 2024
6fa478e
Update MSKFirehoseResponse.java
ShashankAWS Jul 3, 2024
243253b
Update EventLoader.java
ShashankAWS Jul 3, 2024
4505f6d
Update EventLoaderTest.java
ShashankAWS Jul 3, 2024
cb37072
Update EventLoaderTest.java
ShashankAWS Jul 3, 2024
8239c4a
Update msk_firehose_event.json
ShashankAWS Jul 3, 2024
5769d76
Update EventLoaderTest.java
ShashankAWS Jul 3, 2024
e12da26
Update EventLoaderTest.java
ShashankAWS Jul 9, 2024
6fd7282
Update EventLoaderTest.java
ShashankAWS Jul 9, 2024
4c14fec
Update MSKFirehoseEvent.java
ShashankAWS Jul 9, 2024
b3b5f61
Update MSKFirehoseResponse.java
ShashankAWS Jul 9, 2024
62d58c1
Update MSKFirehoseEventHandler.java
ShashankAWS Jul 10, 2024
641b3f4
Update MSKFirehoseEventHandlerTest.java
ShashankAWS Jul 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update and rename MskFirehoseEvent.java to MSKFirehoseEvent.java
  • Loading branch information
ShashankAWS authored Jul 1, 2024
commit eb08bbeb20772d641ee72d5ea34cb244e11438b6
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package com.amazonaws.services.lambda.runtime.events;

import java.nio.ByteBuffer;
import java.util.List;
import java.util.Map;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* Created by vermshas on 6/28/24.
Copy link
Contributor

Choose a reason for hiding this comment

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

why is it needed?

Copy link
Contributor Author

@ShashankAWS ShashankAWS Jul 9, 2024

Choose a reason for hiding this comment

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

removed saw it added to some classes and thought its required. Added copyright/license text to MSKFirehoseEvent.java and MSKFirehoseResponse.java. Do we need to add license text to sample as well ?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, to all source code, please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added license text to samples as well.

* {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove this example and link the docs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the example, I am not able to find any document stating the specific event.

* "invocationId": "",
* "sourceMSKArn": "",
* "deliveryStreamArn": "",
* "region": "us-east-1",
* "records": [
* {
* "recordId": "00000000000000000000000000000000000000000000000000000000000000",
* "approximateArrivalTimestamp": 1716369573887,
* "mskRecordMetadata": {
* "offset": "0",
* "partitionId": "1",
* "approximateArrivalTimestamp": 1716369573887
* },
* "kafkaRecordValue": ""
* }
* ]
* }
*/

@Data
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor

public class MSKFirehoseEvent {

private String invocationId;

private String deliveryStreamArn;

private String sourceMSKArn;

private String region;

private List<Record> records;

@Data
@Builder(setterPrefix = "with")
@NoArgsConstructor
@AllArgsConstructor
public static class Record {

private ByteBuffer kafkaRecordValue;

private String recordId;

private Long approximateArrivalEpoch;

private Long approximateArrivalTimestamp;

private Map<String, String> mskRecordMetadata;

}
}

This file was deleted.