public static void main(String[] args) {
        final BlockingQueue<String> bq = new ArrayBlockingQueue<String>(16);

        for (int i = 0; i < 16; i++) {
            String log = (i + 1) + "--->";
            try {
                bq.put(log);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

        for (int i = 0; i < 4; i++) {
            new Thread(new Runnable() {
                @Override
                public void run() {
                    while (true) {
                        try {
                            String log = bq.take();
                            parseLog(log);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                    }
                }
            }).start();
        }


    }