public void process(IncomingMessageEnvelope envelope, MessageCollector collector, TaskCoordinator coordinator) {
    System.out.println("Adding " + envelope.getMessage() + " => " + envelope.getMessage() + " to the store.");
    store.put((String) envelope.getMessage(), (String) envelope.getMessage());
    coordinator.commit(RequestScope.ALL_TASKS_IN_CONTAINER);
  }
This is a simple task that writes each message to a state store and prints them all out on reload.

It is useful for command line testing with the kafka console producer and consumer and text messages.
samza-test/src/main/java/org/apache/samza/test/integration/SimpleStatefulTask.java