Send a message to workers. Sending a message returns a message id,
which can be used to poll for a response with the other
rrq_message_*
functions. See vignette("messages")
for details
for the messaging interface.
Arguments
- command
A command, such as
PING
,PAUSE
; see the Messages section of the Details for al messages.- args
Arguments to the command, if supported
- worker_ids
Optional vector of worker ids to send the message to. If
NULL
then the message will be sent to all active workers.- controller
The controller to use. If not given (or
NULL
) we'll use the controller registered withrrq_default_controller_set()
.
Examples
obj <- rrq_controller("rrq:example")
id <- rrq_message_send("PING", controller = obj)
rrq_message_get_response(id, timeout = 5, controller = obj)
#> $exhaustible_umbrette
#> [1] "PONG"
#>