code: def tail_messages(self, topic="", passive=False, **kw):
          
  
          if not self.c.get('zmq_enabled', True):
              raise ValueError("fedmsg.tail_messages() is only available for "
                               "zeromq.  Use the hub-consumer approach for "
                               "STOMP or AMQP support.")
  
          poller, subs = self._create_poller(topic=topic, passive=False, **kw)
          try:
              for msg in self._poll(poller, subs):
                  yield msg
          finally:
              self._close_subs(subs)
docs: Subscribe to messages published on the sockets listed in :ref:`conf-endpoints`.
  
          Args:
              topic (six.text_type): The topic to subscribe to. The default is to
                  subscribe to all topics.
              passive (bool): If ``True``, bind to the :ref:`conf-endpoints` sockets
                  instead of connecting to them. Defaults to ``False``.
              **kw: Additional keyword arguments. Currently none are used.
  
          Yields:
              tuple: A 4-tuple in the form (name, endpoint, topic, message).