Failover Transport MessageAck commands aren't filtered in oneway
----------------------------------------------------------------

                 Key: AMQ-3516
                 URL: https://issues.apache.org/jira/browse/AMQ-3516
             Project: ActiveMQ
          Issue Type: Bug
          Components: Transport
    Affects Versions: 5.x
            Reporter: Timothy Bish
            Assignee: Timothy Bish
            Priority: Minor


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.

{code}
                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;
                    }
                }
{code}

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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to