How to process one message at a time on a distributed queue

I have a situation where I need to execute/process a task of a type
          asynchronously and this should be done one at a time. To do that I am thinking of setting
          up a distributed queue (for load balancing and failover). Now I have
          this requirement that only one task should be processed at one time. So
          for example if two messages (m1 followed by m2) are sent to distributed
          queue and I have the distributed queue which points to two physical
          queues on two different instances of weblogic(wl1 and wl2), the
          distributed queue will likely send m1 to wl1 and m2 to wl2 (assuming
          distributed queue is setup with round robin policy). If m1 has started
          executing/processing in my MDB on wl1, I do not want start processing
          m2 on wl2 untill m1 has been processed by wl1. Is it possible to do
          this on weblogic 8.1 JMS?
          If this is not supported I was thinking of implementing a database
          based locking framework and each mdb will use that framework to check
          if a task of a particular type is being processed before processing a
          new task. Also in this case I will need to use max. 1 mdb for each
          queue on each weblogic server.
          --Navjeet                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Hello navjeet,
          I don't think there are any parameters that you can set on a distributed queue to ensure messages are handled in the sequential manner you describe so it looks like you will have to implement your own locking mechanism.
          In reposponse to your other question you can set the number of MDbeans in the free pool to 1 (or the number of queues you have) in the MDBean deployment descriptor.
          see:
          http://e-docs.bea.com/wls/docs81/ejb/message_beans.html#1120592
          Cheers,
          Hoos

Similar Messages

  • HT5361 I want to permanently remove years old emails from my IMac Mountain Lion system.  How can I do this by year instead of laboriously doing it one message at a time?

    I want to permanently remove years old emails from my IMac Mountain Lion system.  How can I do so by year rather than slowly removing one message at a time?  Many thanks.

    Another option is to create a smart mailbox that includes emails with date received before a desired date.
    Then, select one message in the Smart Mailbox and cmd-A to select all. Then delete.

  • How do I select more than one message at a time for archiving

    I want to archive multiple messages into one archive folder. How do I select more than one message at a time?

    Really appreciate the help. Many thanks

  • How to configure my MDB serve only one message at a time?

    Hi All,
    I have requirement where I need to develope a MDB iin weblogic. This MDB has to serve only one message at a time. If the send second message is sent while the first one is running the second message has to sit in queue and start processing once the first message is finished.
    Is there any way to configure via annotations or in weblogic server settings ?
    Any help would be really appreciated...
    Thank you,
    K.

    Here is my client code to send the message
    Connection connection = null;
    javax.jms.Session session = null;
    MessageProducer producer = null;
    try
    connection = lpConnectionFactory.createConnection();
    session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
    // Create a MessageProducer from the Session to the Validation Queue
    producer = session.createProducer(myQueue);
    ((WLMessageProducer)producer).setUnitOfOrder();
    // Create a message
    ObjectMessage message = session.createObjectMessage();
    message.setObject(params);
    message.setStringProperty(MyServiceConstants.OPERATION, operation);
    // Send the message to the queue
    producer.send(message);
    finally
    if (producer != null)
    producer.close();
    if (session != null)
    session.close();
    if (connection != null)
    connection.close();
    Following is the weblogic-ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
    "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd">
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>TestMDB</ejb-name>
    <message-driven-descriptor>
         <pool>
              <max-beans-in-free-pool>1</max-beans-in-free-pool>
              <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
         </pool>
    </message-driven-descriptor>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>

  • How to configure my JMS QUEUE serve only one message at a time?

    Hi All,
    I have requirement where I need to develope a JMS QUEUE in weblogic. This MDB has to serve only one message at a time. Is there any way to configure via annotations or in weblogic server settings ?
    Any help would be really appreciated...
    Thank you,
    K.

    I'm not aware of any way to configure the max pool size via annotations, you might try posting to the EJB newsgroup (please post back the answer). Of course you can set the size via an EJB descriptor, as per the MDB chapter of the Performance and Tuning guide in the edocs.
    By the way, if you have ordered message processing requirements, I highly recommend taking a look at the WebLogic JMS "Unit-of-Order" (UOO) feature as per the UOO chapter of the JMS programmer's guide. For a variety of reasons, the UOO features is often, by far, the best option for handling such requirements. If this feature applies to your use case, then there would be no need to force single threaded message processing in some sort of manual fashion (the feature enforces this for you).
    Tom

  • HT6114 I cannot select more than one message at a time to delete from the trash. Any ideas will be appreciated

    I cannot select more than one message at a time to delete from the trash. I did not have this problem before I updated to Maverick. What am I doing wrong?

    This works in many different ways and in lots of apps.
    Hold down the command key and you can select from a list (leaving some not checked) to exclude them from the delete process.
    To empty all of the trash folder use command-a keys to "select all" and then the delete key to remove them.

  • Processing one file at a time in Biztalk

    We are changing the way we're processing files in that where we used to receive hundreds of small files throughout the day, we are now going to have these files batched into larger files that get dropped to our incoming Biztalk directory. I'm concerned about
    having the server pick up multiple large files at one time. Is there a way to tell a Biztalk application to only process one file at a time, and not to pick up the next file until the previous one has finished? Note, I do not have a way to build this into
    the Orchestration, as this is a Biztalk application that is actually installed by our Trizetto(QNXT) product. It uses Biztalk for XML serialization. 
    Thanks.

    I wouldn't worry about the size of the messages unless they are approaching 1GB. BizTalk can process roughly 400 msgs/sec. Also if you're worried about processing multiple large files try load balancing. With BizTalk it is quite "easy" to load
    balance. In a nut shell you have to have the dll of the application installed on all the servers you want to be apart of load balancing and BizTalk takes care of the rest. Your large files would more than likely split up and processed on different servers.
    http://msdn.microsoft.com/en-us/library/aa578057(v=bts.80).aspx
    The link above is for high availability but could also be used to get a better understanding of load balancing. Also if you use de-batching to split up the 3000-4000 records that would help with processing them. If an orchestration receives a file with 4000
    records in them that instance alone processes the whole file. Whereas if you split up the messages each message gets it's own instance of the orchestration which leads to better performance. The only drawback is that it takes more resources so your environment
    needs to be fairly large. Also if one server is busy another server with the same dll can take the de-batched messages and process them.
    Here is a link to my blog post about de-batching. It is very basic but gives a good base for de-batching.
    http://camartin.azurewebsites.net/post/BizTalk-Debatching

  • Can I delete more than one message at a time

    Is it possible s to delete more than one message at a time and can I stop it putting them back on my phone once deleted??
    any help would be appreciated.
    thanks
    allisongs

    This question was answered here I think:
    https://discussions.apple.com/message/6799512#6799512

  • HOW TO SHOW ONE PAGE AT A TIME

    Does anybody have a clue how to show one page at a time? I clicked Facing Pages in the Inspector and 2 columns of pages showed up. Now, I can't get it back to just one page showing up at a time. There must be a fix, but I don't' want to spend days on this. Many thanks.

    Frank,
    At the bottom left of the page, click on the zoom percentage, then select One-up from the menu.
    -Dennis

  • Is there a way to delete more than one message at a time

    on my iPhone 6 I can hit the edit link in messages and easily and quickly delete lots of messages at a time.  on my iMac it seems you have to delete one message at a time, which takes a lot more time........isn't there a way to delete messages in bulk in Yosemite messages?

    Hi,
    A single Bubble is a single Message or iMessages depending on the account it is with.
    A single bubble can be highlighted then the Backspace/Delete key used.  (the greys in this pic hardly differ to tell though)
    A whole chat/Conversation (Apple calls iMessages connections "conversations" and other connection have always been "Chats" since iChat 1) can be deleted by mousing over the chat in the list and using the x icon that appears without having to bring that one to the "front" or top.
    7:43 pm      Wednesday; March 18, 2015
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • How to process multiple messages through one url over https

    Hi,
    My scenario is HTTP to IDOC, and the vendor will send different messages through one url to SAP system.
    is there any way to achieve this?
    Thanks
    Jessica

    can the Vendor at least pass URL parameters ? Normally, when you have several messages interfaces, the HTTP sender system should distinguish them with the URL parameters (party, namespace, interface). By that, XI then knows how to handle those messages, and can start its receiver determination pipeline. See SAP Help for HTTP sender channel:
    Queries entering the plain HTTP adapter must have the following syntax:
    http://<hostname:port>/<path>?<query-string>
    The query string contains the following data:
    ●      Sender namespace ?namespace=<namespace>
    ●      Sender interface &interface=<interface>
    These details define the sender interface.
    ●      Sender service &service=<service>
    Specifies the sender service.
    ●      Sender party (optional) &party=<party>
    CSY

  • Sending data to targer one message at a time

    Hi
    I have a file -> http scenario.
    in the file there is customer data with multiple customer records.
    I have to send these customers to the HTTP client one cust at a time. how can i do this and what can be the mapping cardinality.
    and how will the bpm look like
    thanks
    nikhil

    HI Jai,
    I checked the sxmb_moni the HTTP message is in there. but there is no message from the IP going out .
    I even checked the sxmb_moni_bpe . in there the last work item mentioned is block. it seems to me that the send step inside the block was not processed.
    i was getting a problem and that was while assigning the current line in the block step the container created at the process level was not getting accepted. so i had to creat the container at the block level. and the same i assigned to the send step to .
    if you can figure out something then please do let me know
    Thanks
    Nikhil

  • Cfmail spool sending one message at a time

    I have mx7 standard installed on win 2003 server
    a cfmail page sends files to the spool corectly.
    The spool is only sending out one message every 60 seconds or
    so. Changing the spool interval has no effect.
    these need to go out a lot faster than this.
    the mail.log is showing this but i'm not sure it's the
    problem.
    Aug 4, 2006 11:19 AM Error 0
    Exception reading response; nested exception is:
    java.net.SocketTimeoutException: Read timed out
    Aug 4, 2006 11:18 AM Error 0
    Exception reading response; nested exception is:
    java.net.SocketTimeoutException: Read timed out
    Aug 4, 2006 11:17 AM Error 0
    Exception reading response; nested exception is:
    java.net.SocketTimeoutException: Read timed out
    Aug 4, 2006 11:16 AM Error 0
    Exception reading response; nested exception is:
    java.net.SocketTimeoutException: Read timed out
    Aug 4, 2006 11:15 AM Error 0
    Exception reading response; nested exception is:
    java.net.SocketTimeoutException: Read timed out
    thanks for any help in advance.

    I would suggest playing with the other mail specific
    settings, such as #of mail delivery threads, but my guess is you've
    already messed with these.
    Perhaps it has nothing to do with CF, but rather a bottleneck
    with the process that is creating the emails. How many emails are
    you trying to send?
    Is it a query driven mail tag?
    Another aspect to check would be the version of JRUN being
    used by CF. You might find an update to a newer version of JRUN
    would solve the problem.
    Given the errors you've listed (SocketTimeout), they seem to
    be JAVA specific.
    In any case, good luck!
    bh

  • How do I drag simultaneously mulitple images viewed in Preview to Finder. I know how to do one image at a time by dragging

    How do I drag multiple images simultaneously from Preview to Finder. I know how to do one at a time. However since I typically shoot at 12 frames per second, sports photography, I have a lot of images to move of one athlete while in motion.

    (A personal footnote):
    Why are you using Preview at all? I hardly ever use it for anything, finding it very limited.
    I am only an amateur photographer, but I much prefer GraphicConverter which, for example, in batch mode would do much of what you ask.
    IMO it is probably the best shareware application ever written for the Mac.
    If you don't know it, give it a try:
    http://www.lemkesoft.com/content/188/graphicconverter.html

  • How to delete one record at a time

    hi all,
    Please tell me how i do delete only one record at a time.After deleting the record the jsp page should show only the remining items to be deleted.

    Where do u want to delete the record - database?
    If so use the rpimary Screen identifying each record and use that to delet that record

Maybe you are looking for