QuickFIX/J

CLONE -On checksum errors, include information on the problem section of the stream

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Default Default
  • Resolution: Unresolved
  • Affects Version/s: 1.2.1, 1.3.0, 1.3.1
  • Fix Version/s: 1.3.2
  • Component/s: Engine
  • Labels:
    None

Description

If there is a checksum error an error is logged, but it does not include the problem section of stream. This would useful in determining if it was a garble, a problem with the counterparty's software or whatever.

A patch we've tried is to add the following snippet to FIXMessageDecoder.handleError(ByteBuffer, int, String, boolean), right before the "if(disconnect))":

        int mark = buffer.position();
        try {
            StringBuilder sb = new StringBuilder(text);
            sb.append("\nBuffer debug info: ").append(getBufferDebugInfo(buffer));
            buffer.position(0);
            sb.append("\nBuffer contents: ");
            try {
                final byte[] array = new byte[buffer.limit()];
                for(int i = 0; i < array.length; ++i)
                    array[i] = buffer.get();
                sb.append(new String(array, "ISO-8859-1"));
            } catch (Exception e) {
                sb.append(buffer.getHexDump());
            }
            text = sb.toString();
        } finally {
            buffer.position(mark);
        }

Activity

Hide
Rhys Yarranton added a comment - 29/Apr/10 6:35 PM

This is not fixed in 1.4.0.

Show
Rhys Yarranton added a comment - 29/Apr/10 6:35 PM This is not fixed in 1.4.0.

People

Vote (0)
Watch (0)

Dates

  • Created:
    29/Apr/10 6:34 PM
    Updated:
    29/Apr/10 6:35 PM