Skip to content
/ AnyMQ Public
forked from clkao/AnyMQ

Simple message queue based on AnyEvent

Notifications You must be signed in to change notification settings

herveus/AnyMQ

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME
    AnyMQ - Non-blocking message queue system based on AnyEvent

SYNOPSIS
      use AnyMQ;
      my $mq = AnyMQ->topic('Foo'); # gets an AnyMQ::Topic object
      $mq->publish({ message => 'Hello world'});

      #  bind to external message queue servers using traits.
      #  my $bus = AnyMQ->new_with_traits(traits => ['AMQP'],
      #                                   host   => 'localhost',
      #                                   port   => 5672,
      #                                   user   => 'guest',
      #                                   pass   => 'guest',
      #                                   vhost  => '/',
      #                                   exchange => '');
      #  my $mq = $bus->topic('foo')

      $mq->publish({ message => 'Hello world'});

      # $bus->new_listener('client_id', $mq);

DESCRIPTION
    AnyMQ is message queue system based on AnyEvent. It can store all
    messages in memory or use external message queue servers.

    Messages are published to AnyMQ::Topic, and consumed with AnyMQ::Queue.

METHODS
  new
    Returns a new AnyMQ object, which is a message bus that can associate
    with arbitrary AnyMQ::Topic and consumed by AnyMQ::Queue

  topic($name or %opt)
    Returns a AnyMQ::Topic with given name or constructor options %opt. If
    called as class method, the default bus will be used. Topics not known
    to the current AnyMQ bus will be created.

  new_topic($name or %opt)
    Creates and returns a new AnyMQ::Topic object with given name or
    constructor options %opt. This should not be called directly.

  new_listener(@topic)
    Returns a new AnyMQ::Queue object, and subscribes to the optional given
    topic. If called as class method, the default bus will be used.

AUTHORS
    Tatsuhiko Miyagawa Chia-liang Kao

LICENSE
    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

SEE ALSO
    AnyMQ::Topic, AnyMQ::Queue

About

Simple message queue based on AnyEvent

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Perl 65.5%
  • Other 34.5%