Git Product home page Git Product logo

wolfmq's Introduction

WolfMQ

WolfMQ is a small and fast Erlang message broker and queued task processor

Description

Wolfmq features:

  • Automatic creation and closing of the queues
  • Use any term as a queue id
  • Processes messages in the order in which they come
  • Run different groups of queues on different supervisors
  • By default, the queue is a task processor, but you can change behaviour

Getting Started

1> application:start(wolfmq).
ok
2> 
2> QueueId = erlang:unique_integer([monotonic, positive]) rem 10.
1
3>
3> ok = wolfmq:push(QueueId, fun() -> io:format("Hello world!~n"), ok end).
Hello world!
ok
4> 
4> ok = wolfmq:push(QueueId, {io, format, ["Hello world!~n"]}).                
Hello world!
ok

Project Chat Room

Gitter chat

wolfmq's People

Contributors

kostiushkin avatar

Stargazers

 avatar glicOne avatar Igor K avatar Dmytro Kovbasa avatar Conrad Steenberg avatar longlongtimesago1 avatar Mykola Liahusha avatar  avatar Leonardo Rossi avatar Oleksii Semilietov avatar Vitalii Kletsko avatar Maxim Ilyin avatar Igor Prots avatar  avatar

Watchers

 avatar James Cloos avatar Maxim Ilyin avatar Igor Prots avatar

wolfmq's Issues

Not all tasks are performed

When two tasks pushed at the same microsecond, wolfmq put them with the same Id, as result will be performed only one task. Could you please fix this problem?

Add multi push

Add multi push

For example:

Task1  =  {mymod, myfunc1, [gen_ref(), A,B,C]}.
Task2  =  {mymod, myfunc2, [gen_ref(), A,B,C]}.
Task3  =  {mymod, myfunc3, [gen_ref(), A,B,C]}.

% Simple push
1> wolfmq:push(QueueId, Task1).
ok
2> wolfmq:push(QueueId, Task2).
ok
3> wolfmq:push(QueueId, Task3).
ok

%% Multi push
4> wolfmq:push(QueueId, [Task1, Task2, Task3]).
ok.

Add callbacks

Please add callbacks, something like

Pid ! msg

after job is done

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.