aws / aws/aws-durable-execution-sdk-java

[Feature]: parse SQSEvent and other trigger event types

Đang mở
#366 4 bình luận 1 reaction 1 người được giao Được @zhongkechen nhận Xem trên GitHub
enhancement
Ngôn ngữ chính
Java
Star
28
Fork
11
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
45

Mô tả

### Expected Behavior

When a durable function is subscribed to an SQS queue, then the incoming SQS event should directly convert to `SQSEvent` model of [AWS Lambda Java Events library](https://github.com/aws/aws-lambda-java-libs/blob/main/aws-lambda-java-events/README.md).

### Actual Behavior

Durable execution fails with the following error.
```
Cannot invoke \"java.util.List.iterator()\" because the return value of \"com.amazonaws.services.lambda.runtime.events.SQSEvent.getRecords()\" is null
```

### Steps to Reproduce

1. Set up SNS -> SQS -> Durable Lambda (Java)
2. Use `SQSEvent` model of [AWS Lambda Java Events library](https://github.com/aws/aws-lambda-java-libs/blob/main/aws-lambda-java-events/README.md).
```java
public SQSBatchResponse handleRequest(final SQSEvent event, final DurableContext ctx) {

}
```
3. Publish an SNS message.

### SDK Version

1.0.1

### Java Version

17

### Is this a regression?

No

### Last Working Version

_No response_

### Additional Context

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.