Implementing our own messaging queue

With the theory out of the way, let's see how we can build our own little queue publisher and listener. For our example here, we will use one of the simpler messaging systems based on Redis called bull (https://www.npmjs.com/package/bull). First we will write the code that will run this whole system, and to make things easy for us, we will use the same image for both the consumer and the producer.

In a new directory, create the following:

As a reminder, this code is also in the GitHub repository and you can view it or clone it from https://github.com/sgnn7/deploying_with_docker/tree/master/chapter_6/redis_queue if you do not want to type the full text.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.15.84