GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mojo::RabbitMQ::Client::LocalQueue(3) User Contributed Perl Documentation Mojo::RabbitMQ::Client::LocalQueue(3)

Mojo::RabbitMQ::Client::LocalQueue - Callback queue

  use Mojo::RabbitMQ::Client::LocalQueue

  my $queue = Mojo::RabbitMQ::Client::LocalQueue->new();

  # Register callback when content appears
  $queue->get(sub { say "got expected content: " . $_[0] });

  # Push some content to consume
  $queue->push("It Works!");

  # This prints:
  # got expected content: It Works!

Mojo::RabbitMQ::Client::LocalQueue is a queue for callbacks expecting some content to be received.

Mojo::RabbitMQ::Client::LocalQueue implements following methods:

  $queue->get(sub { process_message($_[0]) })

Registers a callback which is executed when new message is pushed to queue.

  $queue->push("Some content");
  $queue->push({objects => 'are also welcome});

Pushes content to queue and also drains all declared callbacks.

Mojo::RabbitMQ::Client, Mojo::RabbitMQ::Client::Channel

Copyright (C) 2015-2017, Sebastian Podjasek and others

Based on AnyEvent::RabbitMQ::LocalQueue - Copyright (C) 2010 Masahito Ikuta, maintained by "bobtfish@bobtfish.net"

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.

2019-08-20 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.