Refactoring AMQPWriter and _send_method