Index: src/java/org/apache/avro/ipc/Responder.java =================================================================== --- src/java/org/apache/avro/ipc/Responder.java (revision 789903) +++ src/java/org/apache/avro/ipc/Responder.java (working copy) @@ -69,6 +69,13 @@ return bbo.getBufferList(); // read request using remote protocol specification + // incoming per-call metadata from the Requestor + for (long i = in.readMapStart(); i != 0; i = in.mapNext()) { + for (long j = 0; j < i; j++) { + in.readString(null); // consume and discard key + in.readBytes(null); // consume and discard value + } + } String messageName = in.readString(null).toString(); Message m = remote.getMessages().get(messageName); if (m == null) @@ -90,6 +97,8 @@ error = new AvroRemoteException(new Utf8(e.toString())); } + out.writeMapStart(); // Write out per-call metadata as a map + out.writeMapEnd(); // (for now, an empty map) out.writeBoolean(error != null); if (error == null) writeResponse(m.getResponse(), response, out); Index: src/java/org/apache/avro/ipc/Requestor.java =================================================================== --- src/java/org/apache/avro/ipc/Requestor.java (revision 789903) +++ src/java/org/apache/avro/ipc/Requestor.java (working copy) @@ -75,6 +75,8 @@ if (m == null) throw new AvroRuntimeException("Not a local message: "+messageName); + out.writeMapStart(); // Write out per-call metadata as a map + out.writeMapEnd(); // (for now, an empty map) out.writeString(m.getName()); // write message name writeRequest(m.getRequest(), request, out); // write request payload @@ -91,6 +93,15 @@ m = getRemote().getMessages().get(messageName); if (m == null) throw new AvroRuntimeException("Not a remote message: "+messageName); + + // per-call metadata returned from the Responder + for (long i = in.readMapStart(); i != 0; i = in.mapNext()) { + for (long j = 0; j < i; j++) { + in.readString(null); // consume and discard key + in.readBytes(null); // consume and discard value + } + } + if (!in.readBoolean()) { // no error return readResponse(m.getResponse(), in); } else {