Hey, Thank you both for your help :) I was missing this point in the Pregel model. I thought it would be expected to receive empty message iterators.
Yes, I know it is not the best use-case for vertex-centric iteration as there are well-defined steps, and also know the Flink examples. I only wanted this as a demonstration for the participants of the workshop (among other examples) of thinking in the vertex-centric Pregel model. Then I would show them the other solution that fits the problem more. Of course, I could implement triangle count with the vertex-centric iteration too, but I ran into this behavior and was not sure if it was expected. I might move on to other examples. Thanks anyway :) Cheers, Gabor