code: def messaging(_context, repository, reset_on_start=False):
      
      discriminator = ('messaging', repository)
      reg = get_current_registry()
      config = Configurator(reg, package=_context.package)
      _context.action(discriminator=discriminator, # pylint: disable=E1101
                      callable=config.setup_system_repository,
                      args=(repository,),
                      kw=dict(reset_on_start=reset_on_start))
docs: Directive for setting up the user message resource in the appropriate
      repository.
  
      :param str repository: The repository to create the user messages resource
        in.