hivent v3.0.0 API Reference

Modules

The main Hivent application. It starts both a Consumer and an Emitter process

The Hivent Consumer. Use module options to configure your consumer:

  • @service The name of your service, ie: “order_service”
  • @topic The topic you want to consume, ie. “some:event”
  • @partition_count The number of partitions data will be partitioned in

The Hivent Emitter module. It emits signals into a Hivent Server instance through a Websocket

A Hivent Event struct.

  • payload contains the actual content of the event
  • meta contains supporting metadata, such as date of creation, name of producer, etc

In-memory implementation of a Hivent emitter. Includes utility methods to query the cache. Use this in your tests to assert your events are properly published