memphis.py
memphis.py copied to clipboard
Use separate connections for producers, consumers, etc.
Currently, producers and consumers all share a single connection to the Memphis broker. The user creates a Memphis
object and calls connect()
to establish a connection. When producers and consumers are created with Memphis.producer()
and Memphis.consumer()
, the connection object is passed to the constructors of the Producer and Consumer classes.
Should we be doing this? Or should each new producer or consumer get its own connection?