2 Replies Latest reply on Aug 18, 2014 2:07 PM by go_dores

    browseOnly consumer?

    go_dores

      Can anyone point me to a working example of a browseOnly consumer?  I have written one to support a UI to browse the queue contents, and it works great as long as the other consumer threads are shut down.  But if the browseOnly consumer runs while other consumer threads are actively processing the queue, the receive method for the browseOnly consumer returns null (i.e., the queue appears empty to the browse only consumer).

       

      When I google this I see people pointing out that browseOnly consumers don't work with paging.  I have not configured paging, and I see this issue even when I turn off persistence.  So unless there is something that causes paging to kick in even when it isn't configured (?), I don't think my problem is paging.  I am able to reproduce this with a small number (a few hundred) of very small queue messages.

       

      I am using the Core API, not the JMS API, in case that matters.

       

      Any pointers or tips would be appreciated, especially from anyone who has actually coded a working browseOnly consumer.

        • 1. Re: browseOnly consumer?
          jbertram

          The problem here is likely cause by consumers buffering messages.  A browser won't see a message which is buffered by a consumer.  Read more here.

           

          By the way, I moved your post out of the HornetQ Development forum and into the more generic HornetQ forum.  The HornetQ Development forum is for discussions about the development of HornetQ itself and not discussions about using/configuring HornetQ.

          • 2. Re: browseOnly consumer?
            go_dores

            That did it, you rock, thanks.