Count number of messages

Hi,
How do I count the number of messages on a queue with a message selector? Do I ned to read message by message to count them?
Is it possible to make a message stay in queue even after its read?
thanks
shiva,

Use a QueueBrowser. You have to iterate through the whole queue (effectively fetching all the messages), but the messages stay in the queue for others to consume. Note that the browser may be a snapshot. It takes time to iterate and it can change while you iterate. Even if your provider offers a cursor like browser, messages can be consumed and produced behind you.
Most vendors have some sort of administrative API to get this information. It would not be considered portable.

Similar Messages

  • Count the number of message in remote queue.

    Does any method in MQSeries or JMS, can count the number of message in remote queue.
    I try to use QueueBrowser to browser, but got exception when browse the remote queue.
    thanks.

    You cannot read from, browse or query a remote MQ Queue, only write to it. Try www.mqseries.net or ibm website for any ways around this...

  • How to get the number of messages consumed by a MDB ??

    Hi all,
    How to get the number of messages consumed by a MDB displayed in OEM in a Java Application ???
    DMS ??? what use DMS ???
    tanks

    ok.
    Well using DMS is one way to get at these sorts of stats in a programmatic manner.
    There's a Java API you can use, or you could call out to the Spy servlet to query the DMS stats in either text or XML form.
    I don't have an MDB published so I can't show you specifiically, but here's the sort of query you can use to extract the data.
    http://localhost:8888/dms0/Spy?format=raw&table=oc4j_ejb_stateless_bean&recurse=children
    Which produces a table of the TEXT form:
    <DMSDUMP version='9.0.4' timestamp='1163456821185 (Tue Nov 14 08:57:01 CST 2006)' id='8888' name='OC4J'>
    <statistics>
    /oc4j [type=n/a]
    /oc4j/default [type=oc4j_ear]
    /oc4j/default/EJBs [type=oc4j_ejb]
    /oc4j/default/EJBs/jmsrouter_ejb [type=oc4j_ejb_pkg]
    /oc4j/default/EJBs/jmsrouter_ejb/AdminMgrBean [type=oc4j_ejb_stateless_bean]
    pooled.count:     11     ops
    pooled.maxValue:     1     count
    pooled.minValue:     0     count
    pooled.value:     0     count
    ready.count:     11     ops
    ready.maxValue:     1     count
    ready.minValue:     0     count
    ready.value:     0     count
    session-type.value:     Stateless     
    transaction-type.value:     Bean     
    /oc4j/default/EJBs/jmsrouter_ejb/EnqueuerBean [type=oc4j_ejb_stateless_bean]
    pooled.count:     11     ops
    pooled.maxValue:     0     count
    pooled.minValue:     0     count
    pooled.value:     0     count
    ready.count:     11     ops
    ready.maxValue:     0     count
    ready.minValue:     0     count
    ready.value:     0     count
    session-type.value:     Stateless     
    transaction-type.value:     Bean     
    /oc4j/default/EJBs/jmsrouter_ejb/TimerHandlerBean [type=oc4j_ejb_stateless_bean]
    pooled.count:     11     ops
    pooled.maxValue:     0     count
    pooled.minValue:     0     count
    pooled.value:     0     count
    ready.count:     11     ops
    ready.maxValue:     0     count
    ready.minValue:     0     count
    ready.value:     0     count
    session-type.value:     Stateless     
    transaction-type.value:     Bean     
    </statistics>
    </DMSDUMP>
    Or produces an XML document of the form:
    http://localhost:8888/dms0/Spy?format=xml&table=oc4j_ejb_stateless_bean&recurse=children
    You can use the Spy console to find the table that contains the details for MDB and then take it from there.
    This is not what you specifically want to do, but it does provide a good overview of how DMS is used.
    http://www.oracle.com/technology/pub/notes/technote_dms.html
    -steve-

  • How to determine the number of messages in a queue, that ...

    Hi,
    what's the proper way to count the number of the messages in an Advanced Queue that are currently visible to consumers?
    Currently we use:
    select count(*) from aq$queue_tab_name q where q.QUEUE = 'Q_NAME';
    The problem with that approach:
    If one consumer dequeues a lot of messages in one transaction, that change in the number of messages visible to other consumers is only made visible after the consumer issues a commit. Before the commit is issued, the above "select count(*) ..." statement (issued from a different DB-session) does not reflect the fact that one consumer consumed a lot of messages, messages that are not available to other consumers anymore (only exception: the original consumer issues a rollback sooner or later).
    So before the commit is issued:
    -the consumed messages are NOT visible to other consumers anymore (which is intended behaviour)
    -but the "select count(*) ..." statement (issued from a different DB session) does NOT reflect that fact
    So the case could arise that the queue becomes empty, while "select count(*) ..." says that e.g. 1000 messages are still in the queue.
    Is there a solution to this problem?
    PS: For our use-case we need these dequeue option :
    dbms_aq.remove;
    dbms_aq.first_message;
    dbms_aq.on_commit;
    Again, the queue itself works correctly, I just need to find a way to determine the number messages that are currently dequeable / visible to the consumers at specific point in time.
    I couldn't find a func/proc in dbms_aq for that purpose.
    Best wishes
    Peter

    The following might be of interest in better understanding the issue you are facing in a broader context:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5771117722373

  • Number of messages in Sent folder

    Since I was 'migrated' a month ago I've been keeping a daily eye on the number of messages in my Sent folder.  Strangely the total is invariably 166!  This is most odd; though my email traffic is generally modest, I send out an average 10-15 messages daily. 
    I retain a large archive of old messages, chiefly in comnnection with my family history research, and the number of my messages listed on WLM is way in excess of 166, so what is happening to the messages 'falling off the end' on BTMail?  Or is this 'just another glitch', that proves that BTMail can't count?

    Which phone do you have ? ...or do you have problems with OVI sync ?
    See if you have these options..
    Messaging-->Options-->Settings-->Other-->No. of saved messages.. set as 999(max.)
    Check if this makes any difference..
    --------------------------------------------------​--------------------------------------------------------​--------------------------------------------------​--If you find this helpful, pl. hit the White Star in Green Box...

  • Number of messages in Smart Mailbox

    A question & some relavent thoughts:
    In Mail, the number of Unread messages is shown the right of each mailbox.  But what are the total number messages?   Alternatively, how many Read messages are there?
    I have many folders.  I am trying to create separate mailboxes for each important (to me) Sender.  Then it would be possible to find out how many messages were in 1 Smart Mailbox not contained in any other Smart Mail Box by
    1. having a Smart Mailbox containing all mail, and
    2. specifying conditions: From ...  Does not contain ...   Sender
    3. for each Sender
    This would be very tedious if one receives mail from many senders.  However, if
    1. all senders belong to at least 1 Group,
    this might be onerous but at least feasible.
    If however,there were a Smart Mailbox condition:
    2. Group ...  Does not contain ...   Sender,
    then this would feasible witnout being too onerous.
    If anyone has any answers and/or suggestions,  I would be very happy to receive same!
    Chuck

    I have had the same problem as well and could not find any way of fixing it! Also when I changed the name of the folder the message count disappeared for a while and then seemed to come back later... very bizarre.
    Anyway, I may have found a solution after spending all afternoon searching the internet on macosxhints. [Link goes to the specific hint].
    I would advise making a complete back-up of your ~/Library/Mail folder before trying this, though. When I did this it seemed to re-import some messages and mark them as unread for some unknown reason. However, I went through and marked them all as 'read', and I have the same number of messages in each mailbox as I did before I tried this, so I can only assume that things are the same as before.
    One thing has changed, however! I no longer have a false number on the 'Flagged' messages smart mailbox! (Although if you have lots of messages marked as 'flagged' it may clear the flag - not sure).
    2Ghz iMac G5   Mac OS X (10.4.4)   4G iPod

  • How can I view the number of messages in each folder

    I have just installed TB 24.4.0 on a new Windows 8 desktop.
    On my older Windows 7 desktop also running TB 24.4.0, the folder pane is configured to display the number of messages and space usage of each folder.
    Both machines are set to the same "classic view" but I cannot persuade the new one to display the same folder statistics, only the count of unread messages.
    Where can I find the option to do this?

    Install this add-on.
    https://addons.mozilla.org/en-US/thunderbird/addon/extra-folder-columns/

  • Number of messages notification in Mail disappears

    At the top of Mail, it lists the number of messages and new messages in the Inbox. For example:
    Inbox (67 messages, 2 unread)
    This always shows when I open Mail, but the counts randomly vanish. To get the counts back, I have to Quit and reopen Mail. This started when I upgraded to Yosemite.

    Try rebuilding the mailbox. This can take awhile if you have a lot of mail.
    Rebuild mailbox
    If that doesn't work, try re-indexing the mailboxes. This can take awhile if you have a lot of mail.
    Reindex messages      Mavericks/Yosemite

  • Number of Messages for a Topic

     

    Hi Jeff,
              I suggest that you open a case with Customer Support.
              Jane Sampson
              Developer Relations Engineer
              BEA Support
              "Jeff Carey" <[email protected]> wrote in message
              news:[email protected]...
              >
              > A startup class reads a Topic that contains e-mail messages from the
              applications
              > of our CRM system. Due to a bug in the startup class a suitable course of
              action
              > wasn't followed upon receipt of an mail Exception. That resulted in
              e-mail not
              > being sent and many messages backed-up.
              >
              > Because e-mail is a critical part of our CRM system, our requirements
              providers
              > want E-mail monitored. The problem is how to do that for a Topic.
              >
              > Responses from you and others indicate there isn't a good solution. If
              querying
              > the JMS tables is as good a solution as any, what status of a message
              associated
              > with the Topic would indicate a message not yet processed? A count of
              those that
              > exceeds a configured value could indicate a mail problem may exist.
              >
              > "Jane Sampson" <[email protected]> wrote:
              > >Hi Jeff,
              > >
              > >WebLogic uses internal implementation to collect this information. There
              > >is
              > >no method that I know of in the JMS API to allow this. Is there a
              > >particular reason that your application needs to do this?
              > >
              > >Jane Sampson
              > >Developer Relations Engineer
              > >BEA Support
              > >
              > >"Jeff Carey" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> How can an application learn the number of messages on a Topic?
              > >>
              > >> The WebLogic Console in JMS/Durable Subscribers/<subscriber> shows
              > >the
              > >number
              > >> of unprocessed messages for the Destination Topic.
              > >>
              > >> Review of documentation didn't reveal either a JMS or WebLogic method
              > >to
              > >get the
              > >> number of messages. Did the WebLogic console get the information by
              > >querying
              > >> the database table jmsmessage for messages for the destid associated
              > >with
              > >the
              > >> Topic and with a particular status? If so, what status?
              > >>
              > >> We are using WebLogic 5.1.
              > >>
              > >> Thank you.
              > >
              > >
              >
              

  • Business Application Log how to suppress 'Number' of messages column

    Dear SDN Members,
    how is it possible to suppress the 'Number' column in a BAL output where the number of messages is printed?
    Thanks and kind regards,
    Cedrik

    HI,
    1. SERVERTHREADS does not contain/limit the count of sessions one can have .
    2. Count of ports will help you decide what is the default SERVERTHREAD count , in your case its 20.
    3. the count 20 signifies the number of threads which a transaction can use ( here threads are nothing by the operating system level threads, to do with the processes and processor).
    4. If you have multiple transactions and you want to improve the performance of them ( in case of slow response or so). You can increase the thread count , to make more threads work for your transactions. Again , this does not limit the count of sessions .
    5. I did not understand the obejctive behind limiting the sessions and avoiding users from accessing . I think , this defeats the whole purpose of having cubes then. You have many cubes ,and huge number of users who pull data and essbase and its kernel are capable of handling this . If you still want to restrcit, might as well set their security ( by letting them not to access cubes).
    Hope this adds value
    Sandeep Reddy Enti
    HCC
    http://hyperionconsultancy.com/

  • -1 number of messages in messages application

    Hi,
    Did anybody see -1 number of messages in messages application notification ?
    I took screenshot quickly when i saw that. after that it disappear.
    Just curious what causes that.

    The only pure JMS solution is to create a QueueBrowser, iterate and count. Most JMS providers have a more efficient but proprietary API to do the same thing.
    Dwayne

  • Count incoming/outgoing messages

    Exchange 2k7 on Windows 2k3.
    Is there a way to count the number of messages going through my exchange server without the use of a 3rd party app? I was thinking is has to be possible with a VB or powershell script but ensure where to start.

    Any chance you can post the contents of your script?
    I can give you an example for what you're wanting to do.  Mine is considerably more complicated, and is accumulating stats per user, broken out by total and unique messages and bytes sent (one 1MB email to 5 recipients is 5 total messages and 5MB total
    bytes, but 1 unique message and 1MB unique bytes), and that broken down by internal and external messages, and received messages are broken down by external, internal, and internal automated (SCOM alerts, etc), so there is a lot of logic involving checking
    the source IP that won't translate very well to someone else's systems.
    Briefly:
    $hts = "hub_server1","hub_server2","hub_server3"
    $start = (get-date).adddays(-1).toshortdatestring()
    $end = (get-date).toshortdatestring()
    $logs = $hts |% {get-messagetrackinglog -start $start -end $end -server $_ -resultsize unlimited}
    $stats = ""| select sent,received
    $logs |% {
        if ($_.eventid -eq "Deliver"){[int]$stats.sent += 1}
        if ($_.eventid -eq "Send"){[int]$stats.received += 1}
    $stats | ft -auto
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Unable to view number of messages in a thread

    Frustrated user here who opens Mail to find that the View bar (don't know what to call it - it is that blue dot) no longer shows the number of messages in a thread. This would be bad enough - but Mail will NOT let me expand the (Read Status?) (Thread Status?) to show the number of unread threads. I can hover the mouse over the divider bar in the "To" field to make it larger or smaller. I can hover the mouse over the divider in the "Subject" field to make it larger or smaller. Same with most (but not all) of the fields. Normally, I can expand the "blue dot" (what the heck is it called????) field, but today I can't. Last time I had this problem - maybe a year ago - I could do nothing to solve it, until about a month later when in just started working again. Help anyone? OS X 10.5.2 on an iMac (20-inch Mid 2007).

    The problem mysteriously went away - just like it did the last time it happened. I can now expand the field to reveal how many messages there are in the threads. I suspect a problem with .mac mail. Maybe there are times when it doesn't know the message count (hard to say why). Anyway - the problem is not solved, but it is not (currently) present.

  • Maximum number of messages sent to a Queue?I hav

    I am currently using Glassfish v2.1 and I have set up a queue to send and receive messages from with Sesion beans and MDBs respectively. However, I have noticed that I can send only a maximum of 1000 messages to the queue. Is there any reason why I cannot send more than 1000 messages to the queue? I do have a "developer" profile setup for the glassfish domain. Could that be the reason? Or is there some resource configuration setting that I need to modify?
    I have setup the configuration properties as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE resources PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Resource Definitions //EN" "http://www.sun.com/software/appserver/dtds/sun-resources_1_3.dtd">
    <resources>
      <admin-object-resource
            enabled="true"
            jndi-name="jms/UpdateQueue"
            object-type="user"
            res-adapter="jmsra"
            res-type="javax.jms.Queue">
        <description/>
        <property name="Name" value="UpdatePhysicalQueue"/>
      </admin-object-resource>
      <connector-resource
            enabled="true" jndi-name="jms/UpdateQueueFactory"
            object-type="user"
            pool-name="jms/UpdateQueueFactoryPool">
        <description/>
      </connector-resource>
      <connector-connection-pool
            associate-with-thread="false"
            connection-creation-retry-attempts="0"
            connection-creation-retry-interval-in-seconds="10"
            connection-definition-name="javax.jms.QueueConnectionFactory"
            connection-leak-reclaim="false"
            connection-leak-timeout-in-seconds="0"
            fail-all-connections="false"
            idle-timeout-in-seconds="300"
            is-connection-validation-required="false"
            lazy-connection-association="false"
            lazy-connection-enlistment="false"
            match-connections="true"
            max-connection-usage-count="0"
            max-pool-size="32"
            max-wait-time-in-millis="60000"
            name="jms/UpdateFactoryPool"
            pool-resize-quantity="2"
            resource-adapter-name="jmsra"
            steady-pool-size="8"
            validate-atmost-once-period-in-seconds="0"/>
    </resources>Edited by: happy_go_lucky_mate on Nov 16, 2009 10:00 AM

    The imqbroker log states:
    [17/Nov/2009:10:27:57 CST] ERROR sendMessage: Sending message failed. Connection ID: 427038234214377984:
    com.sun.messaging.jmq.jmsserver.util.BrokerException: transaction failed: [B4303]: The maximum number of messages [1,000] that the producer can process in a single transaction (TID=427038234364096768) has been exceeded. Please either limit the # of messages per transaction or increase the imq.transaction.producer.maxNumMsgs property.Looks like the imq.transaction.producer.maxNumMsgs property is set to the default value of 1000. As per the documentation,
    The maximum number of messages that a producer can process in a single transaction. It is recommended that the value be less than 5000 to prevent the exhausting of resources.
    So what do I need to do if I need to send more than 5000 messages?

  • How do you count number of changes?

    I know lots of threads out there address counters.  I am trying to count number of changes for example.
    T,T,T,F,F,T,T,T,F,F,F.
    This would give give me count of 3.  I have done several renditions, but it would give me number of T or number F.  I am not sure what would be the best option.
    Henry 

    Here's a faster routine:
    Ton
    Message Edited by TonP on 09-25-2008 07:03 PM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    ArrayCount.PNG ‏5 KB

Maybe you are looking for

  • New macbook air wont download my songs from my iphone 4

    my new macbook air will not let me download my music that i purchased on itunes with my iphone 4. When i connect my iPhone it downloads my pics but none of my songs the screen says scan media i push that button and nothing happens. How do i get my so

  • Recovery Disc Creator does not list any discs for creation

    Brand new NB200-10G (this a UK model). When I run TOSHIBA Recovery Disc Creator it does not show any discs for creation and the CREATE option is greyed out so I cannot create the discs. Now... when I first got it I did not have a USB DVD writer with

  • How to create a folder in iphone3g

    Hiiiiiiiiiiiiiiiiiiiiiiiiiiiii !    How to create a folder in iphone3g............. eg : utilities & game folders..........

  • No video with HDV using quicktime in windows

    Hi I have a .mov file that i can't play in quicktime on XP its a 1080i50 HDV file Has anyone managed to reslove the codec problem for this yet Thanks in advance

  • Do I have to use apples touch I'd with the iphone 5s

    The question is straight forward i would like to use one of the water proof cases like the arm serious otterbox or life proof but I'm not seeing it ever working if I have to use the touch I'd.