base/bif/messaging.bif.zeek

Broker
Cluster
GLOBAL

Functions for peering and various messaging patterns.

Namespaces

Broker, Cluster, GLOBAL

Summary

Functions

Broker::__auto_publish: function

Broker::__auto_unpublish: function

Broker::__flush_logs: function

Broker::__forward: function

Broker::__publish_id: function

Broker::__subscribe: function

Broker::__unsubscribe: function

Broker::make_event: function

Create a data structure that may be used to send a remote event via Broker::publish.

Broker::publish: function

Publishes an event at a given topic.

Cluster::publish_hrw: function

Publishes an event to a node within a pool according to Rendezvous (Highest Random Weight) hashing strategy.

Cluster::publish_rr: function

Publishes an event to a node within a pool according to Round-Robin distribution strategy.

Detailed Interface

Functions

Broker::__auto_publish
Type

function (topic: string, ev: any) : bool

Broker::__auto_unpublish
Type

function (topic: string, ev: any) : bool

Broker::__flush_logs
Type

function () : count

Broker::__forward
Type

function (topic_prefix: string) : bool

Broker::__publish_id
Type

function (topic: string, id: string) : bool

Broker::__subscribe
Type

function (topic_prefix: string) : bool

Broker::__unsubscribe
Type

function (topic_prefix: string) : bool

Broker::make_event
Type

function (…) : Broker::Event

Create a data structure that may be used to send a remote event via Broker::publish.

Parameters

args – an event, followed by a list of argument values that may be used to call it.

Returns

opaque communication data that may be used to send a remote event.

Broker::publish
Type

function (…) : bool

Publishes an event at a given topic.

Parameters
  • topic – a topic associated with the event message.

  • args – Either the event arguments as already made by Broker::make_event or the argument list to pass along to it.

Returns

true if the message is sent.

Cluster::publish_hrw
Type

function (…) : bool

Publishes an event to a node within a pool according to Rendezvous (Highest Random Weight) hashing strategy.

Parameters
  • pool – the pool of nodes that are eligible to receive the event.

  • key – data used for input to the hashing function that will uniformly distribute keys among available nodes.

  • args – Either the event arguments as already made by Broker::make_event or the argument list to pass along to it.

Returns

true if the message is sent.

Cluster::publish_rr
Type

function (…) : bool

Publishes an event to a node within a pool according to Round-Robin distribution strategy.

Parameters
  • pool – the pool of nodes that are eligible to receive the event.

  • key – an arbitrary string to identify the purpose for which you’re distributing the event. e.g. consider using namespacing of your script like “Intel::cluster_rr_key”.

  • args – Either the event arguments as already made by Broker::make_event or the argument list to pass along to it.

Returns

true if the message is sent.