speedwing / log4j-cloudwatch-appender

MIT License
24 stars 15 forks source link

Handle DataAlreadyAcceptedException #3

Closed ConcreteCloudServices closed 7 years ago

ConcreteCloudServices commented 7 years ago

Hey Gio,

We have also (very rarely) experienced the following exception:

DataAlreadyAcceptedException: The given batch of log events has already been accepted. The next batch can be sent with sequenceToken: 49575434191296632061558566622677474456728342287823744514

It looks like we can just re-submit it with the new sequence token on the exception similar to InvalidSequenceTokenException. Unfortunately, DataAlreadyAcceptedException and InvalidSequenceTokenException do not share a common class that has the getExpectedSequenceToken() method so I think we'll have to keep them in separate catch blocks for now.

Thanks much!

nemo83 commented 7 years ago

Ah you guys are amazing!!

nemo83 commented 7 years ago

version 0.0.4 is out, I've also updated the client version of the aws sdk, hope it's not a problem.

ConcreteCloudServices commented 7 years ago

Thanks Gio!