

def sendMessage(self, message):
    content = Content(body=message)
    if self.clientName:
        content['headers'] = {
            'thriftClientName': self.clientName,
        }
    if self.replyTo:
        content[self.replyToField] = self.replyTo
    self.channel.basic_publish(exchange=self.exchange, routing_key=self.routingKey, content=content, mandatory=True)

dataset/ETHPy150Open tweetdeck/txAMQP/src/txamqp/contrib/thrift/transport.py TwistedAMQPTransport.sendMessage/original