Я пытаюсь получить сообщения из очередей SQS, и это сообщение пришло из SNS. Я передаю отображение сообщения в обработчик, но получаю исключение для преобразования метки времени в ZonedDateTime
или LocalDateTime
или Instant
вот сообщение
{
"notificationType": "Bounce",
"bounce": {
"bounceType": "Permanent",
"bounceSubType": "Suppressed",
"bouncedRecipients": [
{
"emailAddress": "blacklist@simulator.amazonses.com",
"action": "failed",
"status": "5.1.1",
"diagnosticCode": "Amazon SES has suppressed sending to this address because it has a recent history of bouncing as an invalid address. For more information about how to remove an address from the suppression list, see the Amazon SES Developer Guide: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/remove-from-suppressionlist.html "
}
],
"timestamp": "2020-03-20T21:00:42.217Z",
"feedbackId": "01070170f9bf8131-9cbe20b1-7997-4d33-8e02-7e828eb01edc-000000",
"reportingMTA": "dns; amazonses.com"
},
"mail": {
"timestamp": "2020-03-20T21:00:42.217Z",
"source": "tester@####.com",
"sourceArn": "arn:aws:ses:eu-central-1:425905684163:identity/####",
"sourceIp": "54.239.6.46",
"sendingAccountId": "425905684163",
"messageId": "01070170f9bf8091-79e59712-3c2d-424c-9eba-3e221ef336ff-000000",
"destination": [
"blacklist@simulator.amazonses.com"
],
"headersTruncated": false,
"headers": [
{
"name": "From",
"value": "tester@####.com"
},
{
"name": "To",
"value": "blacklist@simulator.amazonses.com"
},
{
"name": "Subject",
"value": "lkasnlkaslknaslkn"
},
{
"name": "MIME-Version",
"value": "1.0"
},
{
"name": "Content-Type",
"value": "text/plain; charset=UTF-8"
},
{
"name": "Content-Transfer-Encoding",
"value": "7bit"
}
],
"commonHeaders": {
"from": [
"*****"
],
"to": [
"blacklist@simulator.amazonses.com"
],
"subject": "lkasnlkaslknaslkn"
}
}
}
Отображение для объекта bounce:
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class Bounce {
private BounceType bounceType;
private BounceSubType bounceSubType;
private List<Recipient> bouncedRecipients;
private ZonedDateTime timestamp;
private String feedbackId;
private String remoteMtaIp;
private String reportingMTA;
public static enum BounceType {
Permanent, Transient
}
public static enum BounceSubType {
General, Suppressed
}
}
Я использую пружинную загрузку 2.2.5