Que is a job processing library in Elixir

Que is a job processing library in Elixir
Average rating: 0
(0 votes)

Thanks! You’ve rated this material!

If you are interested in Elixir, we have good news for you. We have a lot of useful information about this programming language. Que is a job processing library in Elixir that we are going to explore today closer.

Que is a job processing library backed by Mnesia, a distributed real-time database that comes with Erlang / Elixir. That means it doesn’t depend on any external services like Redis for persisting job state. This makes it really easy to use since you don’t need to install anything other than Que itself.

Que runs out of the box, but by default all jobs are stored in-memory. To persist jobs across application restarts, specify the DB path in your config.exs:

config :mnesia, dir: 'mnesia/#{Mix.env}/#{node()}'  # Notice the single quotes

And run the following mix task:

$ mix que.setup

This will create the Mnesia schema and job database for you. Que is very similar to other job processing libraries such as Ku and Toniq. Start by defining a Worker with a perform/1callback to process your jobs.

For a detailed guide, see here.

And find some Elixir pros and cons and its main frameworks.

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

*By submitting this form you agree with our Privacy Policy.

Mailing & Legal Address

Syndicode Inc. 340 S Lemon Ave #3299, Walnut CA, 91789, USA

Visiting & Headquarters address
Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
Email info@syndicode.com
Phone (+1) 9035021111