@asyncio.coroutine<EOL><INDENT>def timed_request(self, subject, payload, timeout=<NUM_LIT:0.5>):<DEDENT>
next_inbox = INBOX_PREFIX[:]<EOL>next_inbox.extend(self._nuid.next())<EOL>inbox = next_inbox.decode()<EOL>future = asyncio.Future(loop=self._loop)<EOL>sid = yield from self.subscribe(inbox, future=future, max_msgs=<NUM_LIT:1>)<EOL>yield from self.auto_unsubscribe(sid, <NUM_LIT:1>)<EOL>yield from self.publish_request(subject, inbox, payload)<EOL>try:<EOL><INDENT>msg = yield from asyncio.wait_for(future, timeout, loop=self._loop)<EOL>return msg<EOL><DEDENT>except asyncio.TimeoutError:<EOL><INDENT>future.cancel()<EOL>raise ErrTimeout<EOL><DEDENT>
Implements the request/response pattern via pub/sub
using an ephemeral subscription which will be published
with a limited interest of 1 reply returning the response
or raising a Timeout error.

  ->> SUB _INBOX.2007314fe0fcb2cdc2a2914c1 90
  ->> UNSUB 90 1
  ->> PUB hello _INBOX.2007314fe0fcb2cdc2a2914c1 5
  ->> MSG_PAYLOAD: world
  <<- MSG hello 2 _INBOX.2007314fe0fcb2cdc2a2914c1 5