mapping과 collectingAndThen의 실행 위치

element별 변환과 group result 후처리를 서로 다른 단계로 둔다.

  1. Session 입력

    group bucket으로 들어온다

    element
  2. mapping

    각 Session을 topic String으로 바꾼다

    per item
  3. toList

    bucket 결과를 누적한다

    container
  4. finisher

    List.copyOf 또는 Summary를 만든다

    per group

핵심: finisher는 결과 소유권과 public type을 바꾸는 계약이다.