diff --git a/frameworks/broker.rst b/frameworks/broker.rst index 78c2ce9b5..f7926af74 100644 --- a/frameworks/broker.rst +++ b/frameworks/broker.rst @@ -276,19 +276,11 @@ define any event handlers for events that peers will send. :linenos: :tab-width: 4 -There are two different ways to send events. - -The first is to call the :zeek:see:`Broker::publish` function which you can +To send an event, call the :zeek:see:`Broker::publish` function which you can supply directly with the event and its arguments or give it the return value of :zeek:see:`Broker::make_event` in case you need to send the same event/args multiple times. When publishing events like this, local event handlers for -the event are not called. - -The second option is to call the :zeek:see:`Broker::auto_publish` function where -you specify a particular event that will be automatically sent to peers -whenever the event is called locally via the normal event invocation syntax. -When auto-publishing events, local event handlers for the event are called -in addition to sending the event to any subscribed peers. +the event are not called, even if a matching subscription exists. .. literalinclude:: broker/events-connector.zeek :caption: events-connector.zeek @@ -301,6 +293,20 @@ to the ``zeek/events`` topic prefix you would receive events that are published to topic names ``zeek/events/foo`` and ``zeek/events/bar`` but not ``zeek/misc``. + +.. note:: + + In prior Zeek versions, :zeek:see:`Broker::auto_publish` was available to + automatically send events to peers whenever the event ere called locally via + the normal event invocation syntax. When auto-publishing events, local + event handlers for the event were called in addition to sending the + event to any subscribed peers. + + :zeek:see:`Broker::auto_publish` has been deprecated due to its + `implicit nature `_. + + .. deprecated:: 7.1 + Remote Logging -------------- diff --git a/frameworks/cluster.rst b/frameworks/cluster.rst index fe5101f29..a1846e112 100644 --- a/frameworks/cluster.rst +++ b/frameworks/cluster.rst @@ -334,12 +334,6 @@ function to publish events, including: - Standard function to send an event to all nodes subscribed to a given topic - * - :zeek:see:`Broker::auto_publish` - - Automatically send an otherwise generated Zeek event to any interested - peers whenever it is locally dispatched. - - Avoid, since it is somewhat “magical”, unless you’ve got code - compartmentalization running with ``@ifdef`` directives. - * - :zeek:see:`Cluster::publish_hrw` - Publishes an event to a node within a pool according to Highest Random Weight (HRW) hashing strategy; see details below