QueueBrowser doesn't enumerate all messages

Hi there,
I've the problem that, using a QueueBrowser, I don't get all messages from a Queue but only the first (say, out of five), using a MessageConsumer, I get all five messages.
This problem occurs, when I use (our own) administrative tool to peek at a queue with QueueBrowser, take the message and "copy" it to a backup-queue by simply sending it there via a MessageProducer. Once this "backup" queue has more than a single message in it, abovementioned problem occurs - is this supposed to work (simply re-sending a peeked message somewhere)?
(Of course, this question is about the development of our own admin tool, which doesn't work for some reason in this case, not its usage or such).
kind regards,
Messi

Hi,
Under OpenMQ 4.1 I had success using a QueueBrowser . I am also using the Spring Framework 2.5.5.
Please post if you have any questions about the code snippet...
Here is a code snippet that works for me:
        JmsQueueBrowser browser = new JmsQueueBrowser();
        browser.setQueueName("testQueue");
        JmsTemplate myJmsTemplate = browser.getJmsTemplate();
        FileSystemXmlApplicationContext myCtx = browser.getCtx();
        final Queue queue = (Queue) myCtx.getBean(browser.getQueueName());
         * Browse thru the Queue specified
        Integer count = (Integer) myJmsTemplate.execute(new SessionCallback()
            public Object doInJms(Session session) throws JMSException
                int count = 0;
                QueueBrowser browser = session.createBrowser(queue);
                Enumeration<Message> messages = browser.getEnumeration();
                Message myMessage;
                while (messages.hasMoreElements())
                    count++;
                    myMessage = messages.nextElement();
                    System.out.println(new Date() + "\nQueue:" + queue.getQueueName() + "\nMessage[" + count + "]:" + myMessage + "\n");
                return new Integer(count);
        });Here is output from the code supplied:
[vdev3th:scripts]> JmsQueueBrowser
Wed Dec 31 06:48:00 MST 2008
Queue:testQueue
Message[1]:
Class: com.sun.messaging.jmq.jmsclient.ObjectMessageImpl
getJMSMessageID(): ID:43-10.80.165.6(eb:55:a8:22:5:f4)-62069-1229362455598
getJMSTimestamp(): 1229362455598
getJMSCorrelationID(): 1229358651043
JMSReplyTo: null
JMSDestination: testQueue
getJMSDeliveryMode(): PERSISTENT
getJMSRedelivered(): false
getJMSType(): null
getJMSExpiration(): 0
getJMSPriority(): 4
Properties: null
Wed Dec 31 06:48:00 MST 2008
Queue:testQueue
Message[2]:
Class: com.sun.messaging.jmq.jmsclient.ObjectMessageImpl
getJMSMessageID(): ID:61-10.80.165.6(d7:35:c4:97:3e:2e)-57754-1229362458534
getJMSTimestamp(): 1229362458534
getJMSCorrelationID(): 1229359315969
JMSReplyTo: null
JMSDestination: testQueue
getJMSDeliveryMode(): PERSISTENT
getJMSRedelivered(): false
getJMSType(): null
getJMSExpiration(): 0
getJMSPriority(): 4
Properties: null
Wed Dec 31 06:48:00 MST 2008
Queue:testQueue
Message[3]:
Class: com.sun.messaging.jmq.jmsclient.ObjectMessageImpl
getJMSMessageID(): ID:70-10.80.165.6(eb:e3:a:32:5b:f6)-37869-1229362458545
getJMSTimestamp(): 1229362458545
getJMSCorrelationID(): 1229358651042
JMSReplyTo: null
JMSDestination: testQueue
getJMSDeliveryMode(): PERSISTENT
getJMSRedelivered(): false
getJMSType(): null
getJMSExpiration(): 0
getJMSPriority(): 4
Properties: null
Hope this helps...

Similar Messages

  • QueueBrowser doesn't work when messages are in the queue

    We are attempting to list off the messages in a JMQ 2.0 queue while our application is running. The code currently creates a new Connection & Session and then a new QueueBrowser on each queue. Following that, we get an Enumeration of the messages in the queue and print them out.
    When no messages are in the queue, this approach works fine and prints out all the relevent information. However, when a message is in the queue, the QueueBrowser just hangs. I've tried on transacted and non transacted QueueSessions and the same thing happens.
    Is this known behavior and is it possible to work around it?
    Thanks,
    Mike

    Try restarting the Mac with the ethernet cable plugged in and with a live device attached ('live device' = another Mac, a modem, a printer, or a hub/switch/router, which has been powered on).

  • QueueBrowser not scaning all messages in JMS queue (ie not showing inprogre

    Hi all,
    I am using JMS in jboss-3.2.3, when scaning for pending messages i am using QueueBrowser.
    But QueueBrowser not scaning all messages in JMS queue (ie not showing inprogress message)
    But i need to know all messages including ongoing messages..
    Antone plz help me
    I am using Queuesender and QueueReceiver ..But some Exception or Error causes my JMS server(QueueReceiver listening for onMessage()) hanged up..and not responding to remaining messages...So i need to find pending messags in JMS queue..How can find?
    Now i am using QueueBrowser to get list of pending msgs in queue... But doesn't contains Message which passed for processing (called onMessage())
    .. But i need to find this also..How can?
    Thanks,
    Thilsen

    You're right in thinking that the behaviour you describe looks wrong.
    Take a look at the QueueBrowser interface which can be used to inspect a queue. You get one using QueueSession.createBrowser(Queue). The QueueBrowser allows you to scan a queue without consuming the messages. However note that the state of the queue may change while you're observing it through the QueueBrowser so what you see might not always be a 100% accurate representation of the queue at any given time.
    Other things to check:
    - message selectors - are you setting a message selector on your queue receiver which is resulting in not all of the messages 'matching'.
    - expired messages - are you setting a time-to-live on the messages that you publish.
    Hope this helps,
    David Ingham
    http://www.arjuna.com

  • IPad doesn't receive all text messages

    iPad doesn't receive all text messages

    An iPad can receive iMessages only, not text messages as in SMS/MMS.

  • Queuebrowser getEnumeration() failing to return all messages

    Hi,
    I am using open mq in LOCAL mode in an glassfish v2 ur2 app server.
    My application is multithreaded.
    When I call the getEnumeration() method of QueueBrowser with small numbers of messages (<500) I get the correct count. However when I have about 900 messages in a queue, not all the messages are returned. The actual number returned varies. I suspected it may have been a timing issue (the browser may need time to gather all the messages) so i implemented a thread sleep after Connection.start() was called but before getEnumeration() was called. This did not really help.
    here is a code snippet:
          browser = session.createBrowser(queue,selector);
          logger.info("using selector "+browser.getMessageSelector());
          qConn.start();
          try {
            Thread.currentThread().sleep(500);
          } catch (InterruptedException ee) {
          Enumeration msgs;
          for (msgs = browser.getEnumeration() ; msgs.hasMoreElements() ;){
            Message m = (Message) msgs.nextElement();
            list.add(m.getJMSCorrelationID());
          logger.info("Got "+list.size() +" messages ");I have tried using REMOTE and EMBEDDED brokers, and also switching away from the standard derby backend and using oracle. all to no avail.
    If anyone has any ideas i'd gratefully receive these.
    Thanks,
    Phil

    I still cannot get this to work.
    I have tried altering these attributes to various values, but it makes no difference.
    Probably because they are still not being set:
    I get this error:
    [#|2008-11-17T13:25:48.872+0000|WARNING|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=18;_ThreadName=p: thread-pool-1; w: 3;setImqQueueBrowserRetrieveTimeout;com.sun.messaging.jms.ra.ManagedConnectionFactory;_RequestID=c76a233d-fd8e-4af2-b1f8-4dd4ff65468f;|RAR8000 : The method setImqQueueBrowserRetrieveTimeout is not present in the class : com.sun.messaging.jms.ra.ManagedConnectionFactory|#]
    [#|2008-11-17T13:25:48.872+0000|WARNING|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=18;_ThreadName=p: thread-pool-1; w: 3;imqQueueBrowserRetrieveTimeout;com.sun.messaging.jms.ra.ManagedConnectionFactory;_RequestID=c76a233d-fd8e-4af2-b1f8-4dd4ff65468f;|RAR7097: No setter method present for the property imqQueueBrowserRetrieveTimeout in the class com.sun.messaging.jms.ra.ManagedConnectionFactory
    Please tell me how I am supposed to set the properties you suggested above ?
    Setting them as additional properties via the glassfish admin concole does not work.
    Thanks in advance,
    Phil

  • My father updated his iPhone and once he did that he would receive all of my texts and iMessages, is that because we are on the same iCloud account? And if that's why how can I remove it or make it so he doesn't get all my messages

    My father updated his iPhone and once he did that he would receive all of my texts and iMessages, is that because we are on the same iCloud account? And if that's why how can I remove it or make it so he doesn't get all my messages

    you can change the accounts of different apps in the phone's settings menu.

  • Mail downloads all messages– how to stop it

    Using OS 10.9.1 now, but this behavior is for previous OS versions, as well.
    I use Mail with Yahoo IMAP, and it downloads all messages to my hard drive. Can I set it not to do that? The preferenences are set to " Check for new messages manually" and have been for years, but it still downloads every message. Is the "checking" process independent of the downloading of messages? I kind of thought I could control these two processes. In other words, can I set Mail to download only the messages that are less than one year old or to show the messages, but not download them? I know I can use the web to view without downloading, but here in China, the web is sometimes "off" for Yahoo, while a mail client can still show Yahoo email, so it is often necessary to use the Mail app to see email. I just don't need them saved to my hard drive.

    I was searching to see if Apple Mail and Yahoo Imap downloads everything when I came across your post!   While I like that, it would be good if someone could tell us where the setting/option is for it.
    Perhaps in Yahoo itself?  Nah!  That doesn't make sense.  It should be on the client side (if I have my terminology correct!)

  • Does anyone get a vibration sound when talking on the iPhone6? It doesn't happen all the time and happens with talking to different people.

    Does anyone get a vibration sound when talking on the iPhone6? It doesn't happen all the time and happens with talking to different people. I have tried to troubleshoot it, but can't find a answer.

    Hey CEVYNBARRY!
    Here is an article for you that will help you address this issue:
    Troubleshooting "A connection failure has occurred", "The specified server could not be found" or similar messages
    http://support.apple.com/kb/ts1843
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • My kid`s been using my apple ID/account for years, but now that he`s older it`s time he got his own. Is there any way to either make a twin account so he doesn`t lose all his purchases from iTunes/AppStore when getting his own account?

    My kid`s been using my apple ID/account for years, but now that he`s older it`s time he got his own. Is there any way to either make a twin account so he doesn`t lose all his purchases from iTunes/AppStore or does he have to start from scratch? They payment can still be from my card/account, that`s not the problem, but facetime, imessage etc. is a available on both mine and his apple products (I know you can check what email/phone number we can be reached at, but it`s just a click and he see my messages and I his). It`s the privacy problem that is the most important.

    frank_o_s wrote:
    My kid`s been using my apple ID/account for years, but now that he`s older it`s time he got his own. Is there any way to either make a twin account so he doesn`t lose all his purchases from iTunes/AppStore or does he have to start from scratch? They payment can still be from my card/account, that`s not the problem, but facetime, imessage etc. is a available on both mine and his apple products (I know you can check what email/phone number we can be reached at, but it`s just a click and he see my messages and I his). It`s the privacy problem that is the most important.
    He needs to have his own account, the sooner the better.
    As for content, non-protected songs can simply be copied to his own new library, and he can use them.  As for protected content and apps, anything he still wants will have to be replaced.

  • PC Suite doesn't show the messages in memory card

    Hei,
    Phone - 6210 Navigator
    PC Suite - 7.1
    Memory in use: Memory card
    When I open the  Communication Centre from PC Suite, it doesn't show the messages. In the left pane, number of messages in the folders is shown as zero. This happens if the memory is set to memory card.
    On the other hand, if I set the memory to Phone memory, the messages are shown properly. Why is this happening and what's the solution?
    When I tried to take a backup, all data, except messages, is backed up. 
    Few days back, I could access all the messages via PC Suite. It worked fine. But, now, there's some problem.
    I've lots of messages in the memory card & I wanna move them to different folders. How else can I do it?
    -Babloo 

    Hello,
    I think I found the cause of the problem. There's some problem with the memory card.
    I set the memory for Camera also to memory card and when I take a snap, something something happens. If I set the memory to phone memory, it works fine. 
    But, I can access the files/folders in the memory card both from the mobile & via PC Suite. 
    Now, my question is "How do I retrieve the messages from the memory card?"
    Any help will be greatly appreciated.
    -Babloo 

  • Not all messages are delivered to Mail

    It's so frustrating! My web-based version of my POP account receives messages that Mail doesn't. It has nothing to do with junk filters or rules; the mail just never arrives. There's no particular domain after the '@' that doesn't arrive, although I first noticed it when someone with a gmail account tried to email me. Furthermore, I sent an email with my own gmail account to my pop account in question and it never arrived in Mail! Is something corrupted in my Mail app?
    I'd really appreciate your feedback on this.
    adrian

    Try the following.
    Quit Mail first and using the Finder, go to Home > Library > Mail > this account named folder (named by the user name and incoming mail server for the account) > MessageUidsAlreadyDownloaded.
    Delete the MessageUidsAlreadyDownloaded file and empty the Trash.
    Launch Mail and if successful, any previously downloaded messages that remain on the server will be downloaded again in addition to all messages available not yet downloaded by Mail.
    If not successful and although I haven't experienced the same, it has been reported by others here that certain spam messages or legit messages than contain unusual formatted HTML sometimes "clog" the receipt of all messages available at the incoming mail server. Look for and delete all spam messages that are available at the incoming mail server for the account via webmail access.

  • Inbox loses all messages older than one/two days

    So, I'm the proud new owner of an iPhone, and while I'm generally very happy with it, I'm having some email troubles that I hope someone here might help me sort out.
    The issue is that all the messages that come into my mailbox disappear after a day or two, which negates (at least for me) any advantage to having on-the-go email. My iPhone is set up to receive email from a POP account, and so far, I've had no problems receiving or sending mail - it's the not-deleting-emails-from-my-inbox issue that's giving me fits.
    At first, I thought it might have something to do with the settings on the desktop computer (Mac Pro) which is also set up to receive emails from this account. The mail application on the desktop had been set to delete all messages from the server a week after the message had been retrieved. Given that the messages in my iphone are deleted from the iphone's inbox a day (at most two) after retrieving the message, I don't think this is an issue (in any case, i am under the impression that the iphone works like any other email application - once it retrieves a message, it is downloaded onto the device, correct? it doesn't just live on the server). In any event, to be on the safe side, I changed the Mac Pro's email settings to never delete messages from the server, but this hasn't affected my iphone's problem.
    I've toyed around with the iphone's settings, but nowhere can I find a setting that addresses this specific problem. Anyone out there had the same trouble I'm having? If so, were you able to fix it? is it something I'm overlooking?
    Thanks in advance.

    That is the correct spot, what is/was that option set to under deleted Messages? Try setting it to Never and see if that might change the emails behavior. If that is not the cause then it might be a issue with the Mail Application Software on the phone in your particular case and would need to restore the phone.
    Another thing to try is to remove the email account on the phone then re-add the account and see if it is doing the same thing.

  • How do archive all messages over 5yrs old for easy access if needed

    My Thunderbird folders are very large after 10 years and I have over 100 sub-folders. I need to keep all messages but would like to keep the oldest, say over 5 years old, separate as I rarely need to see them again. Archiving would make navigation easier. Where in Thunderbird's help pages does it explain how to do this , as well as how to access the archive ? Is it better to make a new profile called Archive and move the archived messages to that ?

    Assuming you have all your emails pre-organised in folders called : Acme, Brown, Carter etc
    When you created the Archive options, if you had selected yearly and retain folder structure, then it would be archived as follows:
    > Archives
    > > 2008
    > > > > Acme
    > > > > Brown
    > > > > Carter
    > > 2009
    > > > > Acme
    > > > > Brown
    > > > > Carter
    If you selected monthly and retain folder structure:
    > Archives
    > > 2008
    > > > >2008-01
    > > > > > >Acme
    > > > > > >Brown
    > > > > > >Carter
    This would mean that all the Acme, Brown, Carter folders would be in Archives, but the size of the folder will be smaller because it is divided by year, or even smaller if monthly is used. (If you only have a few emails per month then yearly would be ok). So, if you have not organised your emails into eg: Acme, Brown, Carter folders, then do this first, then when you Archive them they will still be located under Archives in a folder of that name, so easy to locate.
    Folders containing emails that you see in the Folder Pane are in reality mbox files - not folders, and these files are stored in your profile folder.
    Each file has emails stored one after the other, in the order they were downloaded, so emails are not stored in individual files. If you accessed your Profile folder and opened one of these mbox files using 'Notepad', you would see one huge long document. Each mbox file also has a .msf indexing file.
    Large documents carry a greater risk, if something goes wrong, you could lose a lot of emails. The point of using the auto archiving is that this will sub divide those large files into smaller files and therefore carry less overall risk per file and use less memory when accessing.
    http://kb.mozillazine.org/Performance_-_Thunderbird
    '' Thunderbird loads a folder's *.msf file into memory whenever it opens the folder. By default it keeps up to 30 *.msf files open for 5 minutes (and their contents in memory), unless they are "special" folders, which it never closes. It loads the inbox.msf file for every account on startup. The best way to minimize the amount of memory used is to archive messages you have already read or otherwise no longer need in Inbox into folders that you rarely open. Moving a message to an archive folder opens it, so consider archiving messages by year and month rather than yearly so that the archive being used doesn't get excessively large. ''
    If you choose to not use Archive options and instead manually created Acme, Brown, Carter folders in the Archives folder,it means you will have to manually move emails into those folders.
    In which case, you will just be creating new large folders, which will get larger everytime you move an email. As they are Archive folders then they will end up with even more emails than you currently have, so I'm sure you can imagine what could happen over time. With Archived emails you need to consider the long term.
    At the end of the day the choice is yours, but at least you now have some information to make an informed choice.

  • How to make a list of all messages heads in a folder?

    I have a list of all messages with the columns Subject, From and Date
    I'd like a list of all those messages in a specific folder.

    How does your question relate to Firefox support?
    Firefox doesn't do email, it's strictly a web browser.
    If you are using Firefox to access your mail, you are using "web-mail". You need to seek support from your service provider or a forum for that service.
    If your problem is with Mozilla Thunderbird, please '''Tag''' this thread as being for Thunderbird in the right-hand column of this page. This question currently is in the Firefox queue for answers.

  • Distiller 'default settings' blank and doesn't show all job options

    We're experiencing a problem with Adobe Distiller 9.3.0 being blank next to "Default Settings" with the error, "Error in /Library/Application Support/Adobe/Adobe PDF/Settings/PDFX4 2008.joboptions: /CheckCompliance out of range".
    I can delete that joboptions file, which removes the error message, but the Default Settings pulldown menu still is blank and doesn't show all of the joboptions files that it should.  Only 2 of them are showing up in the pulldown.
    How can I fix this?
    I've tried deleting all joboptions files and letting Adobe self repair them and have tried deleting a few com.adobe.distiller* preference files and nothing yet seems to work.
    Thanks!

    I am connected to a network but we don't share applications. CS5 Design Premium is installed on my machine.
    See screenshot below:
    What is the relevance of this? We seem to have the same location for the output module file.
    Why does mine not work?
    See screenshot below:
    The Adobe Output Module is in my Startup Scripts but it still doesn't work.

Maybe you are looking for

  • LIST_AUTH

    Hi, What does following lines mean in mappings file LIST_AUTH *;*|* $[IMTA_LIBUTIL,imdlauth,$2+$1@$0] They are not there in default file ...but I have seen these entires in some servers?? This is not mentioned in admin guide... RGds

  • Modifying Properties for Ease-In Effects

    I want to modify the ease for an object in my project. I see no difference in behavior when I change the value in the Ease field within the effect's properties. I'm not sure what this value is supposed to represent, but I assume a drastic change in v

  • Do I need the latest firmware?

    I'm running OS 9.2.2 on a G4 667mhz (Digital Audio) and will be upgrading to OS X 10.3.9. My current firmware is 4.14f1; should I be upgrading to the latest firmware 4.2.8f1? Thanks

  • Launch error: video play modules

    Premier Pro cs6 -Win7 -Dell xps8300- nividia 540 video card 3gig video memory. Purchased Subscription. Download complete. When program launches get error message :" Adobe Premier Pro could not find any capable video play modules. Please update your v

  • Is there an option that in MIR7 or in your user settings to enable thatMIR7

    Hi Team, can any body please help in this below issue ?? Is there an option that in MIR7 or in your user settings to enable that MIR7 will always default to normal invoice entry (not to credit invoice). After an credit invoice is posted it will defau