code: private static byte[] buildFilterableHeader(byte[] contextID) {
          final byte[] header = new byte[Ints.BYTES + contextID.length];
          final byte[] length = Ints.toByteArray(contextID.length);
          System.arraycopy(length, 0, header, 0, length.length);
          System.arraycopy(contextID, 0, header, length.length, contextID.length);
          return header;
      }
docs: Build the byte array that may be used for the ZeroMQ filtering associated with {@link Socket#subscribe(byte[])}. For a given contextID
  (translated into a byte array with an {@link EventSerializer}), this function must always reply the same sequence of bytes.
  
  @param contextID
  the identifier of the context.
  @return the header of the ZeroMQ message that may be used for filtering.