Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-6031

AMQP: use System.nanoTime() when deriving time to tick the transport with for idle-timeout handling

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.12.0, 5.12.1
    • Fix Version/s: 5.13.0, 5.12.2
    • Component/s: AMQP
    • Labels:
      None

      Description

      The sending of empty AMQP heartbeating frames to satisfy the remote peers advertised idle-timeout, and closure of the connection if no frames are received from a peer to satisfy our local idle-timeout, are handled by protons Transport#tick() method. This method takes the current time as an argument and determines what (if any) actions should be undertaken now, then returns the next point at which further processing is required. In order to faciliate this the last 'current time' the method was called with is saved between calls.

      As with QPIDJMS-136, we should update our usage of the proton Transport#tick() method to use a monotonic time, derived from System.nanoTime(), rather than a wall time from System.currentTimeMillis(), so that clock changes between these points dont lead to incorrect behaviour (e.g not sending a required frame, or thinking a frame hasnt been received that should have been).

        Attachments

          Activity

            People

            • Assignee:
              robbie Robbie Gemmell
              Reporter:
              robbie Robbie Gemmell
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: