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

Failover Transport MessageAck commands aren't filtered in oneway

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.x
    • 5.6.0
    • Transport
    • None

    Description

      There's some code in FailoverTransport.oneway that was intended to MessageAck commands when the transport was in a failed state that will never be called.

                      if (isShutdownCommand(command) && connectedTransport.get() == null) {
                          if (command.isShutdownInfo()) {
                              // Skipping send of ShutdownInfo command when not
                              // connected.
                              return;
                          }
                          if (command instanceof RemoveInfo || command.isMessageAck()) {
                              // Simulate response to RemoveInfo command or ack (as it
                              // will be stale)
                              stateTracker.track(command);
                              Response response = new Response();
                              response.setCorrelationId(command.getCommandId());
                              myTransportListener.onCommand(response);
                              return;
                          }
                      }
      

      The inner if statement that looks for MessageAck will never be reachable since a MessageAck is not a RemoveInfo or ShutdownInfo command which is the condition for getting into the outer if.

      Attachments

        Activity

          People

            tabish Timothy A. Bish
            tabish Timothy A. Bish
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: