public void publishEvents(int numberOfEvents) {
        for(int i = 0; i < numberOfEvents; i++) {
            Date eventDate = new Date();
            final String uuid = UUID.randomUUID().toString();

            Map<String, Object> event = new HashMap<String, Object>();
            event.put("id", i);
            event.put("date", eventDate);
            event.put("UUID", uuid);
            event.put("text", "This event was publisehd on " + eventDate + " and generated UUID: " + uuid + " for id: " + i);

            listener.receive(event);
        }
    }