Any nice, simple message queue/event dispatcher for Python?

Discussion in 'App Development' started by nooby_mcnoob, Jul 16, 2019.

  1. My use case is that I want to push ticks onto the event dispatcher so I can simulate stuff. I can of course write my own, but would prefer to use someone else's. Eventually, I will use this to also submit orders and receive order updates from within the strategies.

    Main requirements:
    * Easy to use
    * Can be run in-and-out-of-process as a Python library (this is probably asking too much)
    * Fast enough to handle tick data
    * Little to no data loss possible
    * Basically perfect

    My default is RabbitMQ but I'm curious what the state of the art is.
     
  2. 2rosy

    2rosy

    BlueWaterSailor and nooby_mcnoob like this.
  3. When I was teaching Python, I used to use ZeroMQ to demo how message passing should be done. Cool bit of history: Pieter Hintjens (there was a fine man and a good thinker) actually created it as a replacement for AMQP (which he also had a hand in creating) - which was created to handle the demands of the US stock exchange.
     
    nooby_mcnoob likes this.
  4. Thumbs up for ZeroMQ. You might want to also look at https://nanomsg.org

    Not sure it fits your particular use case, but it's worth knowing about and has a variety of bindings.

    EDIT: Just been reading and disovered the Nanomsg project is now dead. Damn. I have a lot to catch up on.
     
  5. jonahern

    jonahern

    I was wondering if erdewit's eventkit can be used for this purpose...don't know enough to be able to confirm
     
  6. That looks a lot like reactive (Rx) which is more about data processing through events. Good to know it exists though.
     
    jonahern likes this.
  7. +1 for 0mq

    GAT
     
  8. Do you use it in your trading?
     
  9. No, but I have considered changing my setup to a message based system (currently objects interact via databases), and when I evaluated the various options out there zero mq came out top.

    GAT
     
    #10     Jul 18, 2019
    nooby_mcnoob likes this.