Categories: Quant Development

How to run Docker RabbitMQ and Python Pika package

Here are the instructions to get a message queue working with Docker and RabbitMQ on MacOs:

Free trading books https://quantlabs.net/ or learn algo trading https://quantlabs.net/dvd

  1. Install Docker onto your desktop like Mac https://docs.docker.com/docker-for-mac/install/
  2. Test it https://docs.docker.com/docker-for-mac/
  3. Test Rabbit MQ https://www.rabbitmq.com/tutorials/tutorial-one-python.html but note: Prerequisites
    This tutorial assumes RabbitMQ is installed and running on localhost on standard port (5672). In case you use a different host, port or credentials, connections settings would require adjusting.
  4. You can launch RabbitMQ as instructed here https://www.rabbitmq.com/download.html but run in a terminal:

docker run -it –rm –name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management

4 Follow instructions and understand to run send.py and receive.py Python scripts

There goes that idea about hosting this combo on a remost hosted cloud server like I got:

We don’t really recommend using Docker on a server with a control panel, particularly cPanel. It’s possible that Docker could interfere with cPanel services and then we wouldn’t be able to directly support that.

It might be better to look at an unmanaged Cloud server that doesn’t have a control panel and all the various services running on common service ports by default.

In fact, most of us techs have personal servers without control panels so we can run applications that don’t play nice with a control panel.

So my only solution is to look at ZeroMQ https://zeromq.org/

The easiest example of Pub Sub model is

https://rillabs.com/posts/pub-sub-with-zeromq-in-python

This results in very very fast queue connection!

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!
caustic

Hi i there My name is Bryan Downing. I am part of a company called QuantLabs.Net This is specifically a company with a high profile blog about technology, trading, financial, investment, quant, etc. It posts things on how to do job interviews with large companies like Morgan Stanley, Bloomberg, Citibank, and IBM. It also posts different unique tips and tricks on Java, C++, or C programming. It posts about different techniques in learning about Matlab and building models or strategies. There is a lot here if you are into venturing into the financial world like quant or technical analysis. It also discusses the future generation of trading and programming Specialties: C++, Java, C#, Matlab, quant, models, strategies, technical analysis, linux, windows P.S. I have been known to be the worst typist. Do not be offended by it as I like to bang stuff out and put priorty of what I do over typing. Maybe one day I can get a full time copy editor to help out. Do note I prefer videos as they are much easier to produce so check out my many video at youtube.com/quantlabs

Recent Posts

My Journey with Algorithmic Trading in Rust

This article chronicles my experience, exploring the motivations behind this choice and the unique advantages …

14 hours ago

Dive into kdb+ and q: A Guide to Learning Resources

But where do you begin your kdb+ and q journey? Don't worry, aspiring q programmers!…

4 days ago

High-Frequency Trading Meets High-Performance Computing: Building Your Dream Career

The world of high-frequency trading (HFT) thrives on speed and precision, and high-performance computing (HPC)…

5 days ago

Python Powers Algorithmic Trading: Mastering the Market with Code

This article explores the exciting opportunities for Python which powers algorithmic trading, equipping you with…

5 days ago

Allure and Limitations of Open-Source Algorithmic Trading Systems

Here, we delve into the potential limitations of relying solely on open-source projects for youropen-source…

5 days ago

Demystifying Latency: A C++ Deep Dive into High-Frequency Trading

Today, we join Brian, host of quantlabs.net, as he explores the intricate relationship between C++deep…

5 days ago