\apex\app\msglistener

Listens for any incoming RPC or one-way direct messages. Used when horizontal scaling is implemented, and this is a back-end application server within the cluster.

Summary

Methods
Properties
Constants
get_rabbitmq_connection()
get_rabbitmq_connection_info()
get_listeners()
dispatch_locally()
listen()
getListenersForEvent()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$rabbitmq_conn
$channel_name
N/A

Properties

$rabbitmq_conn

$rabbitmq_conn :

Type

$channel_name

$channel_name :

Type

Methods

get_rabbitmq_connection()

get_rabbitmq_connection()

Get connection to the RabbitMQ server

get_rabbitmq_connection_info()

get_rabbitmq_connection_info(): array

Get RabbitMQ connection information

Returns

array —

Connection info for RabbitMQ

get_listeners()

get_listeners(string  $routing_key): array

Get listeners for a given routing key

Parameters

string $routing_key

The routing key to get listeners for.

Returns

array —

One-dimensional name of class files that act as listeners

listen()

listen()

Listen

getListenersForEvent()

getListenersForEvent(\apex\app\interfaces\msg\EventMessageInterface  $msg): \apex\app\interfaces\msg\iterable[callable]

Alias for the 'get_listeners()' method above, simply to add full compliance with PSR-14.

Parameters

\apex\app\interfaces\msg\EventMessageInterface $msg

The message to get listeners for.

Returns

\apex\app\interfaces\msg\iterable[callable] —

An iterable (array, iterator, or generator) of callables. Each callable MUST be type-compatible with $event.