     @running = false
     newrelic = require './newrelic'
     @_transactions = new newrelic.Transactions @definition
+    @options = options
+    @options.discoveryPeriod = 60 if not @options.discoveryPeriod # seconds
 
   start: (callback) ->
     @messaging.connect (err) =>

      @setupPorts (err) =>
        @running = true
        return callback err if err
        @register (err) ->
          return callback err

  stop: (callback) ->
    @running = false


class Participant extends EventEmitter
  # @func gets called with inport, , and should return outport, outdata
  constructor: (client, def, @func, role, options={}) ->
    client = transport.getClient(client) if typeof client == 'string'
    @messaging = client
    role = 'unknown' if not role
