I am seeing the following error message in the messaging service logs once every two seconds (repeatedly for hours). This indicates that some client is retrying it continuously, every two seconds.
It is very likely a system component that is performing this operation, due to the consistency of the retry.
This also indicates poor error-handling code. This code (line 84 - https://github.com/caskdata/cdap/blob/release/5.0/cdap-tms/src/main/java/co/cask/cdap/messaging/server/StoreHandler.java#L84) will never execute, because the hasNext method on line 83 will itself throw an exception.
Fixed an error that where TMS publishing was retried indefinitely, if the first attempt failed.
The Jira that Terence linked to doesn't resolve the issue in this Jira, so reopening.
It's not actually a duplicate.