Net::MemcacheQ - Net::MemcacheQ documentation


Net-MemcacheQ documentation  | view source Contained in the Net-MemcacheQ distribution.

Index


NAME

Top

Net::MemcacheQ

VERSION

Top

$LastChangedRevision$

SYNOPSIS

Top

  my $oNMQ = Net::MemcacheQ->new({
    host => '192.168.0.1',
    port => 22202,
  });

  $oNMQ->push('myqueue', '{"some data":"abcdefg"}');

  my $message = $oNMQ->shift('myqueue');

DESCRIPTION

Top

MemcacheQ implements a BerkeleyDB-backed FIFO message queue service serviced using the Memcache protocol. Net::MemcacheQ provides a simple interface against a single memcacheq instance.

For more information about MemcacheQ, please see: http://memcachedb.org/memcacheq/

SUBROUTINES/METHODS

Top

new - constructor

  my $oNMQ = Net::MemcacheQ->new({...});

  Optional arguments:
  host => 'localhost'  # memcacheq server hostname
  port => 22201        # memcacheq server port

queues - arrayref of queue names

  my $arQueueNames = $oNMQ->queues();

delete_queue - delete a queue, messages and all

  $oNMQ->delete_queue($sQueueName);

push - push a message onto a given queue

  $oNMQ->push($sQueueName, $sQueueMessage);

shift - pull a message from a given queue

  my $sMessage = $oNMQ->shift($sQueueName);

DESTROY - disconnect socket on destruction

DIAGNOSTICS

Top

CONFIGURATION AND ENVIRONMENT

Top

Debugging messages are available by setting:

  $Net::MemcacheQ::DEBUG = $Net::MemcacheQ::DEBUG_INFO;

DEPENDENCIES

Top

strict
warnings
IO::Socket::INET
Readonly
Carp
English -no_match_vars

INCOMPATIBILITIES

Top

BUGS AND LIMITATIONS

Top

See those of memcacheq, in particular about message size.

AUTHOR

Top

$Author: Roger Pettett$

LICENSE AND COPYRIGHT

Top


Net-MemcacheQ documentation  | view source Contained in the Net-MemcacheQ distribution.