def send_via_kafka(topic, partition, data): data['a'] = 11 producer.send(topic, partition, json.dumps(data)) data = {'a': 1, 'b': 2} http_sender = partial(send_via_http, 'http://www.appsflyer.com') kafka_sender = partial(send_via_kafka, 'dummy_topic', 'partition_1') send_fns = [http_sender, kafka_sender] map(lambda send_fn: send_fn(data), send_fns)