Allow timeout specification when listening for published messages.