RedHatInsights / yggdrasil

GNU General Public License v3.0
21 stars 37 forks source link

feat: include message id in emitted worker events #115

Closed DuckBoss closed 1 year ago

DuckBoss commented 1 year ago

The purpose of this update is to prepare for the implementation of a message journal in yggdrasil by making small changes to workers. This change adds the worker's message id to the emitted event data in addition to the currently existing ipc worker event name and worker message data.

Current: ...EmitEvent(worker_event_name, worker_event_message) Proposed: ...EmitEvent(worker_event_name, worker_event_message, worker_message_id)

Changes:

ahitacat commented 1 year ago

What is the difference between this message_id and the id in the response_to field?

subpop commented 1 year ago

What is the difference between this message_id and the id in the response_to field?

This is a signal emitted by the worker; it is not intended to be a means by which a worker can "respond" to messages. It's more like the worker saying "okay, I got the message 1234" rather than "here is message 5678 in reply to message 1234".