Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit 586c051

Browse files
committed
cluster: Add Cluster::publish()
1 parent 69f1299 commit 586c051

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

frameworks/cluster.rst

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,10 @@ function to publish events, including:
329329
- Description
330330
- Use
331331

332-
* - :zeek:see:`Broker::publish`
332+
* - :zeek:see:`Cluster::publish`
333333
- Publishes an event at a given topic
334334
- Standard function to send an event to all nodes subscribed to a given
335-
topic
335+
topic.
336336

337337
* - :zeek:see:`Cluster::publish_hrw`
338338
- Publishes an event to a node within a pool according to
@@ -345,6 +345,25 @@ function to publish events, including:
345345
distribution strategy.
346346
- Generally used inside Zeek for multiple logger nodes.
347347

348+
* - :zeek:see:`Broker::publish`
349+
- Publishes an event at a given topic
350+
- Standard function to send an event to all nodes subscribed to a given
351+
topic.
352+
353+
Starting with Zeek 7.1, this function should only be used in
354+
Broker-specific scripts. Use :zeek:see:`Cluster::publish` otherwise.
355+
356+
357+
.. note::
358+
359+
The ``Cluster::publish`` function was added in Zeek 7.1. In contrast to
360+
``Broker:publish``, it publishes events even when a non-Broker cluster
361+
backend is in use. Going forward, ``Cluster:publish`` should be preferred
362+
over ``Broker::publish``, unless the script is specific to the Broker backend,
363+
e.g. when interacting with an external application using native Python
364+
bindings for Broker.
365+
366+
348367
An example sending an event from worker to manager:
349368

350369
.. code-block:: zeek

0 commit comments

Comments
 (0)