private void getOffset(final Request jettyRequest, final HttpServletResponse response) throws IOException {
        final String topic = jettyRequest.getParameter("topic");
        final int partition = Integer.parseInt(jettyRequest.getParameter("partition"));
        final String group = jettyRequest.getParameter("group");
        final long offset = Long.parseLong(jettyRequest.getParameter("offset"));

        try {
            final OffsetCommand offsetCommand = this.convert2OffsetCommand(topic, partition, group, offset);
            final ResponseCommand responseCommand = this.commandProcessor.processOffsetCommand(offsetCommand, null);
            response.setStatus(((BooleanCommand) responseCommand).getCode());
            response.getWriter().write(((BooleanCommand) responseCommand).getErrorMsg());
        }
        catch (final Throwable e) {
            logger.error("Could not get message from position " + offset, e);
            response.setStatus(HttpStatus.InternalServerError);
            response.getWriter().write(e.getMessage());
        }
    }
Use Jetty as http server and handle request of get message/put message/get
offset
metamorphosis-server-wrapper/src/main/java/com/taobao/metamorphosis/http/processor/MetamorphosisOnJettyProcessor.java