Try something like this:
stream
.groupBy(
(key, value) -> value.userId
)
.aggregate(
() -> new Session(),
(aggKey, newValue, aggValue) -> {
aggValue.userId = newValue.userId
if (newValue.start) {
aggValue.start = newValue.start
aggValue.duration = 0
Hi there,
It’s my first voyage into stream processing - I’ve tried a few things but I
think I’m struggling to think in the streams way. I wondered if I could be
cheeky and ask if someone could give me some clues as to the correct design for
my first task to get me started?
I have application e
Hi there,
It’s my first voyage into stream processing - I’ve tried a few things but I
think I’m struggling to think in the streams way. I wondered if I could be
cheeky and ask if someone could give me some clues as to the correct design for
my first task to get me started?
I have application e