def METHOD_NAME(cfg, log, prof):
    term = mt.Event()
    spt.setproctitle('rp.%s' % cfg.uid)
    # start a non-primary session
    session = rp.Session(cfg=cfg, _primary=False)
    # create the component and begin to work
    comp = rp.utils.Component.create(cfg, session)
    comp.start()
    # component runs - send heartbeats so that cmgr knows about it
    hb_pub = ru.zmq.Publisher('heartbeat', cfg.heartbeat.addr_pub)  #, log=log)
    def hb_beat_cb():
        hb_pub.put('heartbeat', msg={'uid': cfg.uid})
    def hb_term_cb(hb_uid):
        comp.stop()
        term.set()
        return None
    hb = ru.Heartbeat(uid=cfg.uid,
                      timeout=cfg.heartbeat.timeout,
                      interval=cfg.heartbeat.interval,
                      beat_cb=hb_beat_cb,
                      term_cb=hb_term_cb,
                      log=log)
    hb.start()
    # register cmgr heartbeat by beating once
    hb.beat(uid=cfg.cmgr)
    # record cmgr heartbeats
    def hb_sub_cb(topic, msg):
        if msg['uid'] == cfg.cmgr:
            hb.beat(uid=cfg.cmgr)
    ru.zmq.Subscriber('heartbeat', cfg.heartbeat.addr_sub,
                      topic='heartbeat', cb=hb_sub_cb,
                      log=log, prof=prof)
    # all is set up - we can sit idle 'til end of time.
    while not term.is_set():
        time.sleep(1)