11 Replies Latest reply on Dec 14, 2010 9:21 AM by ataylor

    QueueBrowser doesn't work

    jacker

      Hi folks, I'm having some problems with QueueBrowser. I have 2 servlets, one to send messages to MDB and other to Browse the queues. But my QBrowser doesn't show the messages in queue. Can someone help me?

       

      I'll attach the files, if someone tell me what's wrong, I'll really be greatful.

       

      ServletConnector3 is the message dispatcher.

      ConnectorMDB is the consumer. The MessageProcessing has a 30 sec. delay because it calls a lot of data.

      My MDB only process one message at time and I really need to implement this browser because I need to manipulate the queue, by removing messages or ordering the queue.

       

      Thanks.

        • 1. Re: QueueBrowser doesn't work
          ataylor

          the messages are probably in the MDB's consumers buffer.

          • 2. Re: QueueBrowser doesn't work
            jacker

            ok, but how can I browse this buffer?

            • 3. Re: QueueBrowser doesn't work
              ataylor

              you cant, the messages have been delivered to the consumers buffer in readiness for delivery to the MDB. A queue browser will only give you the current state of the queue. You could set the client buffer size to 0 but then performance will suck.

              • 4. Re: QueueBrowser doesn't work
                jacker

                Thanks Andy. Have you any idea how can I build a servlet to manipulate the queue? Since yesterday I'm in a dead end with this damn QBrowser. LOL.

                • 5. Re: QueueBrowser doesn't work
                  ataylor

                  what is it exactly you are trying to achieve?

                  • 6. Re: QueueBrowser doesn't work
                    jacker

                    Well, I need to implement a database connector who'll migrate data of my running erp built in Delphi to a new erp built in Java. The idea is a client side scheduler, because this task runs really slowly. I'm using Quartz for that. So the Scheduler trigger some messages to the MDB who execute it. All this scenario is working fine, but now I need to visualize both lines (schedule tasks and queues), because we assume the user will need remove or change the order of taks. Sorry if I was not clear enough and thanks again.

                    • 7. Re: QueueBrowser doesn't work
                      ataylor

                      I'm still not really sure what you want to achieve, from a JMS perspective that is. its quite simple. You have a producer sending to a queue and a consumer receiving messages. The consumer will receive messages into its internal buffer until it is full (the size of this can be configured) irrespective on how fast the MDB is processing. A queue browser will give you the state of the queue at a particular point in time but wont include any messages in the process of delivery

                      • 8. Re: QueueBrowser doesn't work
                        jacker

                        I'll try to explain in a very simple and abstract way. I need to execute long processes on JBoss, I decided to use MDB since

                        I can't let the client waiting (web session, etc). Think of a report that takes 2 hours to complete times 100 clients, I need to

                        execute one by one because of the load on the server. Since on any given time I could have hundreds of reports (messages)

                        waiting on queue I need to be able to visualize them as well as cancell them, one by one or all of them.

                         

                        Details: my clients access the servlets wich producess a message that is sent to a queue. The client receives a response that

                        his report is queued.      The produced and sent message to queue has the necessary parameters to start a report job wich takes

                        a long time. While this job is executing (about 2 hours) the other messages wich start the jobs are on the queue. I need to kill these

                        messages if needed so they won't start other jobs after the first complete.

                         

                        I don't dispose the idea that I'm completely wrong with my approach, so any better idea on processing batch jobs on JBoss are welcome.

                        • 9. Re: QueueBrowser doesn't work
                          ataylor

                          not sure i can help you with any better approaches, messaging is really my domain. You can set the client side buffer to 0 tho as i mentioned before, since performance isn't really an issue it should be fine.

                          • 10. Re: QueueBrowser doesn't work
                            jacker

                            Ok, i'll try that. I'll google it to see how I set the buffer to zero. If you can post some an example, it will be great! Thanks.

                            • 11. Re: QueueBrowser doesn't work
                              ataylor

                              take a look at the no-consumer-buffering example in the distro