📶
Streamer
  • Introduction
  • Event Actor
    • Overview
    • State Machine
    • Event Filter
    • Worker Thread
    • Message Wrapper
    • Synchronous Communication
  • Special actors
    • Combiner
    • Pool
    • Renamer
    • Uploader/Downloader
    • Pipeliner
  • Event Broker
    • Broker
    • Configuration
Powered by GitBook
On this page
  • Responsibilities
  • Definition
  1. Event Broker

Broker

Event-Handling Middleware

PreviousPipelinerNextConfiguration

Last updated 1 year ago

In Streamer, the event broker is a pub/sub-based middleware that mediates the communication of event messages between producer actor and consumer actor. Its role is to manage the publication and subscription of events, allowing different components or services to communicate with each other without direct coupling.

The Event Broker acts as a centralized hub that receives events from event producers and distributes them to event consumers. The producer and consumer actors are not directly aware of each other. They interact mostly through the event broker, although among actors is permitted in some cases. Each Streamer instance may own an arbitrary number of actors, but each actor can only belong to one Streamer instance at a time.

The event broker only manages intra-process event handling. For inter-process event communication, it requires assistance from some .

Responsibilities

In Streamer, the responsibilities of an event broker in include:

  • Consumer Registry: Maintaining a registry of active subscribers/consumers and ensuring that events are delivered to their destinations.

  • Subscription Management: Managing the process of subscription for event consumers.

  • Event Routing: Routing the flow of events from publishers to subscribers.

Definition

type StatefulBroker struct {
	producers []Producer
	consumers []Consumer
	buffers   map[string]streamBuffer
}

synchronous communication
specifically designed actors