Monitoring a Queue.

Hi Guys,
A bit of advise please.
I am working on a trading application, where the gui client, among other messages, sends trade requests to the server.
The server then responds back with either an accept or reject message.
I have been asked to add a layer of protection in case a trade is executed but the server fails to notify the client.
Here is what I am thinking of doing:
1. Create a Map (tradeId - Trade object) which will store all the trades that were executed.
2. Have the client ack every trade.
3. When the server receives the ack, it will look up that particular trade in the map.
3.1 If the trade is found, remove the trade from the map.
3.2 If the trade is not found, insert the trade into a list (unAckedList).
4. Have a thread that will periodically check the size of the unAckedList.
5. If the size if not 0, pop the trade and then again, check whether the trade exists in the map.
(To safe guard against cases when the receipt of the trade ack was slightly delayed).
6. If the trade is still in the map, raise an alert.
Just curious to know your thoughts on this design. Any tips, suggestions are welcome.
Cheers,
Hastings

Thanks Chuck and good suggestion about not removing trades.
To clarify a bit more, the purpose of this bit of work is to only guard against the possibility of communication failure between the client and my server. There is an another server, outside my domain with which my server interacts (where the trades are actually booked). That trade booking server is also implementing a similar mechanism.
(client - My server - booking server)
And while I agree that this approach doesn't guard against all undesirable events (like machine failure), I have been asked to to store trades in memory.
Cheers,
-Hastings

Similar Messages

  • How to monitor jms queues

    Hi,
    I want to monitor JMS queues in a way that if the pending messages increases some limit, i should get alert may be through mail or some message.
    As in the application message load is so much and due to some delay in response from some resources(external application) the messages in the queue start increasing and the "Pending Messages" for the queue start increasing as shown in weblogic server.
    Thanks in advance
    -Abi

    This is a monitoring function. And, monitoring functions are not specified in the JMS specification. For Sun MQ 4.x (don't remember which one), the monitoring functions are accessible through JMX. For other products, see your admin guide.
    [m-10196900]

  • Monitor Print Queue with java program

    I'm plan to write a client/server based application which control the printing for every user. I've no idea how to start on the application.
    1. Is it possible to monitor the print queue or print job using java application?
    2. How does the server react if the client sending the print job to there? How's the client can trigger the signal during printing and send to the server?
    Thank you!

    I'm plan to write a client/server based application
    which control the printing for every user. I've no
    idea how to start on the application.You should establish feasibility first, before planning to write anything
    1. Is it possible to monitor the print queue or print
    job using java application?Not really. Print queues are highly system-dependent things and some e.g. Windows can really only be accessed via system calls in a native language.
    2. How does the server react if the client sending
    the print job to there?Err, it prints the file?
    How's the client can trigger the signal during printing and send to the server? What signal?
    But I suspect the answer to the first question makes the others irrelevant.

  • QRFC Monitor(Inbound Queue)

    Hi Group,
    Can any one please explain the purpose of qRFC Monitor, i mean from this what inforamtion we can monitor, and when this queue is filled..............
    Thanks in Advance,
    Regards
    Ramakrishna Kamurthy

    If youhave a look at this, it might be helpful
    http://help.sap.com/saphelp_nw04/helpdata/en/0b/80f83b0255a206e10000000a11402f/frameset.htm
    Assign points if useful

  • Monitor print queue for job size

    Hi,
    Problem: Occasionally, some print queues are found with a job that is spooling uncontrolled. Job will reach 2/3GB which will cause services to under perform and sometimes crash.
    We are looking at understanding the reason why the file is spooling uncontrolled. I believe it is something to do with the fact some of the users are roaming users and when moving site, when arriving to a new site they should get the correct printers for
    that site. It is happening that this is not being applied so they print to the printer on the previous site where they were, which seems to cause this behavior.... anyway.. I do not have any more logic details around this.. still exploring..
    The question today is, can I set some sort of monitoring on the local print server to alert me when a job on any print queue has reached a specific size?
    Or perhaps delete the job automatically if it does reach this threshold.
    Thank you

    On Server 2012 use the powershell commands included with the product.  For 2008R2 and prior use the WMI Interfaces and the scripts included with the OS
    prnjobs.vbs to list job size and ID, then when the size is excessive the same script is used to delete the job.
    This information at the scripting center looks like what you wish to accomplish
    https://gallery.technet.microsoft.com/scriptcenter/9b07ec17-a3ae-427d-a417-c95f05fc515f
    Alan Morris formerly with Windows Printing Team

  • CCMS monitoring for Queues(SMQ1/SMQ2)

    Hi,
    How do we monitor Queues(SMQ1/SMQ2) in CCMS. My requirement is to monitor Queues(SMQ1/SMQ2) in CCMS based on the Queue name. I want to create different nodes in CCMS and I want queue name falling under certain criteria should come and sit in the respective node of CCMS.
    Means queue with name High_priority should come n sit under node say Test1, queue name with medium_priority should come n sit under node say Test2 and queue name with medium_priority should come n sit under node say Test3.
    Is it possible to do so.

    Hello,
    also for queue monitoring the easier and more flexible way to monitor is via Business Process Monitoring. The configuration is easier than CCMS where you have to use transaction RZ21 and need to transport objects. And the qRFC monitoring is more flexible than in the CCMS. Basically all customers knowing both standard CCMS qRFC monitoring and qRFC monitoring in BPMon chose the later or exchange their existing CCMS monitoring by BPMon.
    See also the SDN blog /people/johannes.fleig/blog/2008/06/11/new-business-process-monitoring-functionalities-in-sap-solution-manager-150-qrfc-monitoring
    and check out the Interface Monitoring Setup Guide under http://service.sap.com/bpm > Media Library > Technical Information.
    Best Regards
    Volker
    Edited by: Volker von Gloeden on Jul 2, 2010 4:48 PM

  • Monitoring mail queue

    One of my applications uses the HTMLDB_MAIL API extensively to send out status change notifications, reminder emails, etc.
    It just does HTMLDB_MAIL.SEND() and forgets about it.
    If my SMTP server is down, there is some network glitch, or whatever, the users don't get their emails and causes a lot of confusion.
    Does anyone have any ideas on how to monitor the HTML DB mail queue to ensure that it is properly flushing the mails out as it should?
    Thanks

    You could setup a job which monitored the mail queue -
    jes@SPDB1> desc htmldb_mail_queue;
    Name                                                                                                              Null?    Type
    ID                                                                                                                NOT NULL NUMBER
    MAIL_TO                                                                                                                    VARCHAR2(2000)
    MAIL_FROM                                                                                                                  VARCHAR2(2000)
    MAIL_SUBJ                                                                                                                  VARCHAR2(2000)
    MAIL_CC                                                                                                                    VARCHAR2(2000)
    MAIL_BCC                                                                                                                   VARCHAR2(2000)
    MAIL_BODY                                                                                                                  CLOB
    MAIL_BODY_HTML                                                                                                             CLOB
    LAST_UPDATED_BY                                                                                                            VARCHAR2(255)
    LAST_UPDATED_ON                                                                                                            DATE
    jes@SPDB1> select count(*) from htmldb_mail_queue;
      COUNT(*)
             0Personally, I call htmldb_mail.push_queue to push the mails to a mail server (Sendmail/Postfix etc), it's then the mail servers "responsibility" to deliver the mails. I monitor the mail server queues/bounces/deliveries/accepts etc using a mixture of Perl and Shell scripts.

  • QRFC Monitor (Outbound Queue) Destination

    Hi Experts,
    In t-code SMQ1, there is no destination defined for the queue name "MCEX03". Although there are LUW entries in the same table column, but no records in rsa7.
    How can we input the destination name? Please advise.
    Regards.

    HI,
    MCEX jobs doesn't show any Destination as this job will process the LUW entries of extraction queue....
    i.e there'll be corresponding job running in SM37 for MCEX jobs periodically when this is successful the LUW entries from extraction queue will processed to delta queue i.e RSA7.
    For eg: if u chk the log of that particular job it'll show the no of LUW's entries moved from extraction queue to Delta Queue for that applciation component, in this case it is '03'.
    After every successful job if u monitor closely, the count of MCEX will be reduced and the count in Application component '03' will be increased.
    rgds,
    Edited by: Krishna Rao on Aug 15, 2009 5:30 PM

  • Monitoring Tuxedo queue-execution times.

    Hello,
    We are having some problems in our Tuxedo environment and would like to
    start monitoring a little the queueing-execution times for our services. As
    far as we can tell, we can see a couple of directions to follow:
    - Tmadmin scripts: Using psr, pq and pclt to gather information about
    the time requests sits queued.
    - Using SNMP: we have a SNMP capable tool that we can use to query the
    MIB and get the adequate values.
    As far as I can tell, I know a couple of things about monitoring, but
    far less about Tuxedo. Both ways seems possible to gather the data we need,
    but.... I would definetely appreciate any help-advice on the matter experts,
    for the best option to identify:
    - Peaks in service times for Tuxedo services.
    - Peaks in requests waiting for servers.
    I have seen tools out there that seem to do this kind of stuff, but
    I´m afraid in our environment the problem is in the Tuxedo applications, so
    I would like to gather data to have a first approach to the problem and then
    getting dirty into the Tuxedo applications. And, even more, I do not feel
    this products are doing anything but querying Tuxedo the same way I would
    do.
    Thanks for your help. I appreciate it a lot.
    Leopold.

    Hello,
    You can try the following:
      Queue q = jcsSession.getQueueByName("<queue name>");
      q.setExecutionSize(new Long(xx));
    Regards Gerben

  • How to monitor weblogic Queue

    Hi,
    we are using weblogic Queue for storing messages .
    Recently we are facing an issue , when the incoming messages are more then our Queue went down
    So the question what i am asking is that , if the Queue goes down , can we get any sort of indication ??
    Thanks for reading .

    hi,
    you can define the threshold and quota for the queue, using that you can define the minimum and maximum
    queue meessages,.
    if it reaches the threshold it will send a notification and it wont allow for new message, it will avoid you to goes down your queue..
    you can use weblogic.WLST to check your JMS parameters,
    JMSRuntime Mbean
    Thanks
    Sundaravel N

  • Why i can't use SMQ2 to monitor inbound queue?

    i modified BP data in ECC. There should be R3AD_CUSTOMExxxxxxx(BP number) in inbound queue, but i can't find that.

    Helo,
    There would be queue entry waiting in R3AD_CUSTOME* queue only if you have de-registered this queue in txn:SMQR.
    Or else this queue entry would get processed automatically.
    Have you checked the BDoc in txn:SMW01to see whether detla changes from ECC is coming to CRM?
    Best Regards,
    Shanthala Kudva.

  • About qRFC Monitor (outbound queue)

    Hi Experts,
    we are upgrading the r/3 system from 4.6 to 4.7 and i am responsible for BW activities, i was asked to take care of the outbound queue what does that mean? and what needs to be done with this queue during r/3 upgrade? and there are some queues(in SMQ1) with destination None and entries 1 what are those???
    Does any one have the check list what needs to be done on the BW side during R/3 upgrade?
    Thanks in Advance.

    all the guides can be found on sapnet
    https://www010.sap-ag.de/instguides
    the particular guide for your particular upgrade is THE place to look for help.  it's very detailed w/ links to all the oss notes you need to review as well.

  • QRFC Monitor (Outbound queue)

    Hello friends,
    I have to delete and fill up the setup tables for the application 18. I have successfully deleted the data from the setup tables in LBWG. But when I am going to delete the entries in extraction queue(LBWQ), I find two queus for application 18. They are MCEX18 & MCEX18_1. Could you pls let me know the reason for the 2 entries. Should I delete both? Same is the case for allication 17.
    Thanks in advance.
    Vishwa

    Hi,
    The entries in LBWQ are those which have only been captured in outbound queues and have not reached RSA7. It is absolutely normal for them to have destination as NONE.
    Go to SMQ1, and execute, there you would find multiple entries for application 18
    e.g.
    Queue Name                                   Destination                      Entries
    BWXXX2LIS_18_I0NOTIF               BWCLNTXXX                      100
    BWXXX2LIS_18_I0TASK               BWCLNTXXX                       200
    MCEX18                                         NONE                                   2000
    The first two entries here are the ones which have already been processed from outbound queue to RSA7. Therefore now they have destination as BW system.
    Please check if here you get entries for 2 different BW systems. This may be the reason for 2 entries MCEX18 and MCEX18_1 in LBWQ.

  • Monitor Print Queue

    What would be the best way to monitor print jobs, and pause them? After pausing them I want to ask for user credentials before resuming the print job.
    Brandon Donnelson
    print-track.sourceforge.net

    Something in one of the native programming languages on the operating system you had in mind.

  • Monitoring Message Queue Propagation

    Hello,
    When working with Oracle Messaging Gateway sometimes it happens that gateway status is running en the agent is reachable (so all is good), but no messages are propagated to subscribers. How can we monitor that message propagation is still working. Is there tooling or scripts for this?
    regards,
    Rob

    Anybody can help me with this?

Maybe you are looking for

  • XMLDecoder not returning all data...

    I am connecting to a web service and viewing the response in the Network Monitor. It shows the appropriate collection of data objects - each contains 2 string variables (name, url) and 2 arrays all containing data. When I view the Result Event in the

  • Error in Kpro server when checking in originals from NW Portal

    Hi Experts, I am not able to check in originals in my NetWeaver Portal. When I try to save I get the follwoing error message: - Error in Kpro server But if I try in to check in the same original in the PLM system through SAP GUI it works just fine. A

  • Why is home share not working

    Hi, I am having problems with Home Sharing between two PCs. Both computers have the most current version of Itunes, both are logged in to the same Home Sharing address and PW.  Our router is an Airport Express.  I pull the music from one computer to

  • Recovery media order for windows 8 64bit

    Hello..i bought my note book before 6 months.. The model no is hp15 d017tu and i have windows 8 64bit os..before some days i had a problem in usb device so i gave it to solve in hp care and they changed modem so they reset it fully..and problem is th

  • Oracle 11gR1 Upgrade

    I want to upgrade my current version of Oracle from 10gR2 to 11gR1. But my concern is advantage i might get which is not available in 10g. My application is not an OLTP and database is neighter in RAC or grid.