Fuse Message Broker client logs "Unexpected Response" after FailoverTransport has reconnected to broker

Solution Verified - Updated -

Environment

  • Fuse Message Broker 5.5.1

Issue

  • Fuse Message broker client's ResponseCorrelator logs debug statement "Received unexpected response" after reconnection.

  • ResponseCorrelator [DEBUG] Received unexpected response: {Response {commandId = 0, responseRequired = false, correlationId = 1}}for command id: 1

Resolution

DEBUG log statements similar to the following can be ignored, after FailoverTransport reconnection:


2012-06-21 15:33:19,409 [ActiveMQ Task-2] INFO FailoverTransport - Successfully reconnected to tcp://localhost:61616?trace=true 2012-06-21 15:33:19,416 [ActiveMQ Transport: tcp://localhost/127.0.0.1:61616] DEBUG Connection:10 - RECEIVED: ConnectionControl {commandId = 0, responseRequired = false, suspend = false, resume = false, close = false, exit = false, faultTolerant = false, connectedBrokers = , reconnectTo = , rebalanceConnection = false} 2012-06-21 15:33:19,417 [ActiveMQ Transport: tcp://localhost/127.0.0.1:61616] DEBUG Connection:10 - RECEIVED: Response {commandId = 0, responseRequired = false, correlationId = 1} 2012-06-21 15:33:19,417 [ActiveMQ Transport: tcp://localhost/127.0.0.1:61616] DEBUG ResponseCorrelator - Received unexpected response: {Response {commandId = 0, responseRequired = false, correlationId = 1}}for command id: 1 2012-06-21 15:33:19,426 [ActiveMQ Transport: tcp://localhost/127.0.0.1:61616] DEBUG Connection:10 - RECEIVED: Response {commandId = 0, responseRequired = false, correlationId = 2} 2012-06-21 15:33:19,426 [ActiveMQ Transport: tcp://localhost/127.0.0.1:61616] DEBUG ResponseCorrelator - Received unexpected response: {Response {commandId = 0, responseRequired = false, correlationId = 2}}for command id: 2 2012-06-21 15:33:19,447 [ActiveMQ Transport: tcp://localhost/127.0.0.1:61616] DEBUG Connection:10 - RECEIVED: Response {commandId = 0, responseRequired = false, correlationId = 4} 2012-06-21 15:33:19,448 [ActiveMQ Transport: tcp://localhost/127.0.0.1:61616] DEBUG ResponseCorrelator - Received unexpected response: {Response {commandId = 0, responseRequired = false, correlationId = 4}}for command id: 4

Root Cause

Why are unmatched responses reported by the ResponseCorrelator when the client's FailoverTransport reconnects to the broker?

On reconnection, the FailoverTransport replays all of the requests previously used to setup the connection context information (sessions, producers, consumers etc). This replay is done at the transport level below/after the ResponseCorrelator. Hence ResponseCorrelator is not aware of these replayed messages when responses are received from the broker. However the client side connection context (sessions, producers, consumers etc) had previously been established before the initial connection was lost, so those responses are not required.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments