Skip to content
Prev Previous commit
Next Next commit
Moved additional MP consumer options to **kwargs
  • Loading branch information
vshlapakov committed Mar 13, 2015
commit f8012c1a74a60623d541d30ff5a21e86fd48c81a
6 changes: 3 additions & 3 deletions kafka/consumer/multiprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

log = logging.getLogger("kafka")

def _mp_consume(client, group, topic, queue, size, events, consumer_options):
def _mp_consume(client, group, topic, queue, size, events, **consumer_options):
"""
A child process worker which consumes messages based on the
notifications given by the controller process
Expand Down Expand Up @@ -153,8 +153,8 @@ def __init__(self, client, group, topic, auto_commit=True,
options.update(simple_consumer_options)

args = (client.copy(), group, topic, self.queue,
self.size, self.events, options)
proc = Process(target=_mp_consume, args=args)
self.size, self.events)
proc = Process(target=_mp_consume, args=args, kwargs=options)
proc.daemon = True
proc.start()
self.procs.append(proc)
Expand Down