hivesolutions / appier

Joyful Python Web App development
http://appier.hive.pt
Apache License 2.0
127 stars 22 forks source link

Extra optional parameter 'consumer_tag' #43

Closed joao-conde closed 3 years ago

joao-conde commented 3 years ago

Extra optional parameter 'consumer_tag' to ensure different consumer tags across multi-thread consumer subscription. It allows for code such as:

class QueueConsumer(Thread):
    ...
    def run(self):
        self.queue.subscribe(
            self.callable_fn,
            consumer_tag = str(self.ident)
        )
        self.queue.loop()
    ...

present in the python light node

joao-conde commented 3 years ago

@joamag This gives more flexibility to the subscribe call of appier AMQPQueue's