aggregation

command
v0.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package main demonstrates dureq group aggregation — collecting individual items into groups that are automatically flushed and processed as a single aggregated job.

Scenario: Event analytics pipeline

  1. Multiple producers emit individual page-view events for different users
  2. Events are grouped by user ID
  3. After a grace period (no new events) or when the group reaches max size, all events for that user are aggregated into a single batch payload
  4. A handler processes the aggregated batch of events at once

This reduces per-event overhead and enables efficient bulk inserts.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL