Kong / Kong/lua-resty-events

Feature Request: Add ability to publish messages to a specific worker ID

Open
#76 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Raku
Stars
36
Forks
17
PR merge metrics
No merged PRs in 30d

Description

## Feature Description

Currently, the `publish` method supports the following `target` parameters:
- `"all"`: Broadcast to all workers
- `"current"`: Process only in the current worker
- unique hash: Send to a random worker

We would like to add the ability to publish messages to a **specific worker ID**.

## Typical Use Case

All workers publish data individually to the privileged agent (worker id = -1), and the privileged agent aggregates and processes the data.

For example:
- Each worker collects its own statistics
- All workers send data to the privileged agent
- The privileged agent aggregates all data and performs aggregation operations

## Questions

1. Does this feature align with the project's design philosophy?
2. If this is feasible, what would be the recommended API design?
3. Are there alternative approaches to achieve this requirement?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the existing publish method and its documented target values: "all", "current", and a unique hash. Trace how worker IDs are represented and routed, then determine whether targeting worker -1 fits the project's design. Done means an agreed API and implementation scope, with tests covering delivery to a specific worker and the existing target behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.