Messagi...ue::DQS(3)
β¨ NAME β¨
Okay so the manual name is Messagi...ue::DQS(3) β yep, itβs a User Contributed Perl Documentation page, and the actual module is Messaging::Message::Queue::DQS. Sheβs an abstraction of a Directory::Queue::Simple message queue, and honestly thatβs the whole NAME section, periodt. π
πΈ SYNOPSIS πΈ
bestie, hereβs the code vibe check:
use Messaging::Message;
use Messaging::Message::Queue::DQS;
# create a message queue
$mq = Messaging::Message::Queue::DQS->new(path => "/some/where");
# add a message to the queue
$msg = Messaging::Message->new(body => "hello world");
printf("msg added as %s\n", $mq->add_message($msg));
# browse the queue
for ($name = $mq->first(); $name; $name = $mq->next()) {
next unless $mq->lock($name);
$msg = $mq->get_message($name);
# one could use $mq->unlock($name) to only browse the queue...
$mq->remove($name);
}
π¦ DESCRIPTION π¦
This module is literally an abstraction of a message queue. It derives from the Directory::Queue::Simple module, which is the one giving you a generic directory based queue. It simply stores the serialized message (with optional compression) as a Directory::Queue::Simple element. Thatβs the lore, and itβs giving small but mighty energy. β¨
π§ METHODS π§
In addition to the methods inherited from Directory::Queue::Simple, the following methods are available:
new(OPTIONS)β returns a newMessaging::Message::Queue::DQSobject (class method). TheOPTIONSare the ones forDirectory::Queue::Simple->new()with the addition of"compression", like forMessaging::Message->jsonify(). classy.add_message(MESSAGE)β adds the given message (aMessaging::Messageobject) to the queue and returns the corresponding element name. slay.get_message(ELEMENT)β gets the message from the given element (which must be locked) and returns aMessaging::Messageobject.
heads up bestie: for get_message(ELEMENT), the element must be locked. no cap. π
π SEE ALSO π
Go give these modules some love: Directory::Queue::Simple, Messaging::Message, Messaging::Message::Queue. iykyk. π«Ά
π AUTHOR π
The author is Lionel Cons <http://cern.ch/lionel.cons>.
Copyright (C) CERN 2011-2016
okay bye bestie π this page is from perl v5.32.1, dated 2019-07-26, and itβs the Messagi...ue::DQS(3) manual. periodt. π
π¦ where this page comes from
- epel 9: perl-Messaging-Message 1.6.1-10.el9 Β· GPL+ or Artistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms