Lemonld...eBroker(3)
π Lemonldap::NG::Common::MessageBroker β the manual page, but make it slay π
okay bestie, gather round, because this is the Lemonld...eBroker(3) page from the User Contributed Perl Documentation and we're gonna get into it. It's the doc for the MessageBroker classes. No cap. π¦
β¨ NAME β¨
Lemonldap::NG::Common::MessageBroker β literally just the doc for MessageBroker classes. That's the whole name. Iconic, minimal, ate. π
πΈ DESCRIPTION πΈ
So starting from 2.20.0, Lemonldap::NG dispatches its events to other nodes using messages sent by a Lemonldap::NG::Common::MessageBroker sub class. Yes, sub class, we're being fancy. β¨
By default, only 2 kind of messages are dispatched:
- configuration updates β every single time a configuration is saved.
heads up: the default broker also adds such messages regularly following the chectTime value (because it's not a real evant pub/sub system β yes, we said evant, that's what the page says, moving on π). This keep previous behavior.
- session logouts β whenever a session is terminated before it expires (either because the user logged out or by action of an administrator).
The default broker just pushes this information on the local node. Other nodes will discover the end of session after local cache expiration β that's max 10 minutes, so like, be patient. π
By default, LLNG uses only one channel, and it's defined in the eventQueueName configuration parameter. One channel. One vibe. π
During initialization, LLNG always creates 2 distinct objects:
- a reader which calls
subscribe()for each channel and then checks for messages every 5 seconds π₯ - a writer which sends messages on channels βοΈ
The Lemonldap::NG::Hanlder::Main::MsgActions class contains actions to be launched when a message enters the main events channel. Yes, Hanlder. We copy it exactly. We don't fix it. We respect it. π«Ά
π METHODS π
Except applyConf, all this methods must exist in a Message Broker. All of them, bestie. No skipping. β
π§ new
Constructor. Arguments:
$class: class name$conf: current LLNG configuration$logger: aLemonldap::NG::Commonlogger
π§ publish
Method to insert an message. Arguments:
$self$channel: the channel name$msg: a hash reference containing the message
π§ subscribe
Methode called during LLNG initialization for its message reader object. Arguments:
$self$channel: the channel name
π§ getNextMessage
Non blocking method that return a message in the given channel if one exists. Arguments:
$self$channel: the channel name
π§ waitForNextMessage
Blocking method that waits for a message in the given channel and return it. Arguments:
$self$channel: the channel name
β οΈ bestie, notice the difference:getNextMessageis non blocking,waitForNextMessageis blocking. That's the whole plot twist. π
π§ applyConf
Optional method called after configuration save. It is used only with the default message broker to launch previous behavior: call all reload URLs. Lowkey a legacy moment, but she's still serving. π
π MESSAGE FORMAT π
A message is a HASH reference. A message in the main event channel must contain a key action. This key is used by Lemonldap::NG::Hanlder::Main::MsgActions to launch the corresponding method.
- Configuration update
{
action => 'newConf'
}
- Session end
{
action => 'unlog',
id => '<configuration id to be removed from local cache>'
}
π₯ SEE ALSO π₯
Lemonldap::NG::Manager, Lemonldap::NG::Portal, Lemonldap::NG::Handler
π AUTHORS π
LemonLDAP::NG team <http://lemonldap-ng.org/team>
π BUG REPORT π
Use OW2 system to report bug or ask for features: <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>
π DOWNLOAD π
Lemonldap::NG is available at <https://lemonldap-ng.org/download>
β COPYRIGHT AND LICENSE β
See COPYING file for details.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
and that's the whole page, bestie π«Ά this was rendered with perl v5.42.3, dated 2026-09-24, and it's the Lemonld...eBroker(3) page β go forth and dispatch your messages, main character ππ¦β¨
π¦ where this page comes from
- fedora 43: lemonldap-ng-common 2.23.4-1.fc43 Β· GPL-2.0-or-later AND MIT AND GPL-3.0-or-later AND OFL-1.1-RFN
- fedora 44: lemonldap-ng-common 2.23.4-1.fc44 Β· GPL-2.0-or-later AND MIT AND GPL-3.0-or-later AND OFL-1.1-RFN
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms