Skip to content

Commit

Permalink
[Java] Poll for error response from archive in RecordedBasicPublisher.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjpt777 committed Feb 26, 2018
1 parent dbed999 commit 89cdafe
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ public static void main(final String[] args) throws Exception
final long result = publication.offer(BUFFER, 0, messageBytes.length);
checkResult(result);

final String errorMessage = archive.pollForErrorResponse();
if (null != errorMessage)
{
throw new IllegalStateException(errorMessage);
}

Thread.sleep(TimeUnit.SECONDS.toMillis(1));
}

Expand Down

0 comments on commit 89cdafe

Please sign in to comment.