adds connect to broker helper function
implements the init function of the worker API
implements the mdwkrDestroy
implements setters