ConnectException thrown from publishAndLogIfRequired, since put method just groups the event based on flushTime and flushSize
Added is500 and isUnauthorized in HttpUtil class
After retry check if errorCode is 500 then throw HttpException else log and skip the message. since there could be chance that message failed from temporary 504-GatewayTimeout error in those case we just want to log and move ahead with processing
HttpException default error - 500
StringBuffer to StringBuilder since we don't need synchronized block inside method parameters
Summary
1-2 line summary of changes
Related Issue
Changes
Please enter each change as a new bullet point
Relevant Documentation
Please enter the links of any docs updated to reflect this change
How Has This Been Tested?
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Summary
1-2 line summary of changes
Related Issue
Changes
Please enter each change as a new bullet point
Relevant Documentation
Please enter the links of any docs updated to reflect this change
How Has This Been Tested?
Types of changes
Checklist