Consuming from Queue

I am working with a group, and they need to be able to look at an item on the Queue without consuming it. I think this can be done?? The item you are looking at should be locked to keep other elements from using it while you evaluate this using the item.
If that makes sense???
I am not sure if the default JMS implements this behavior. Can anyone confirm..

Hi,
Yes, you can browse messages from a queue (have a look at QueueBrowser). However a queue browser returns a snapshot therefore the messages that are browsed are not �locked� i.e. they can be consumed and browsed.
A solution that may be useful to you is to consume the queue messages within a transacted session. The consumed messages are not visible to other consumers and your client application can have a look at them in isolation. You can then rollback the transaction whenever you need to �release� those messages. Note that if you don�t want to reinsert those messages in the queue you only need to commit your transaction. It is a bit of a hack but it should work.
Hope this helps,
Arnaud
www.arjuna.com

Similar Messages

  • Cases where messages are not being consumed from a queue

    MQ 4.0
    I have a cluster of 3 brokers. Java clients use RANDOMIZE to connect to the cluster of brokers. Message selectors are not used. My consumers are all synchronous, and connection.start() is called prior to calling MessageConsumer.receive().
    What I have seen on random occassions are messages not being consumed from the queue. The problem seems to be sporadic.
    I was thinking that the reason it is sporadic is because of the RANDOMIZE configuration of the client connetion / object-store.
    That is, there is a possibility for the following to happen:
    1) There were messages produced on a queue on broker A, but before these messages were consumed, all the consumers have been shutdown. Thus, the messages on queue stayed on broker A .... and have not been copied / clustered to the other brokers in the cluster ( As per online documentation, a queue is "copied" to other brokers only when there is a consumer for that queue on the other brokers ).
    2) Then the client applications started up produced and consumers again. This time, the producers were all connected to broker B, and all consumers for the queue were also connected to broker B.
    3) Because there are no other consumers for the queue on the other brokers, the messages in the queue on broker A are never consumed.
    Can someone confirm that this is a possibility ?

    Well ... it does seem to be the case.
    I changed the object-store so that instead of using RANDOMIZE for imqAddressListBehavior, it uses PRIORITY. Therefore, all clients ( producers and consumers ) will connect to only 1 broker out of the 3 in the cluster.
    After restarting all JMS clients with the new imqAddressListBehavior, there were messages in various queues in the other brokers that were not being consumed, because there are no longer any consumers on any of the other brokers.
    All the messages in that broker that all JMS clients connect to are being consumed ...
    Except for about 6 messages that stays in the queue for whatever reason. All consumers receiving with receive( 10000 ), and after consuming all messages above the 6, it returns without any more messages in the queue.
    Well ... so much for cluster of brokers. I'll have to think of an alternative.

  • Consuming Data from Queue using proxy service

    Hi , i am coming up the problem of consuming the queue .
    My flow is like :
    1. Created Connection factory(JNDI - cf) targeting Admin Server and queue(JNDI - q) targeting WllsbJmsserver.
    2. Created A JMS based Buissness Service of Any XML type and it is used for publishing the incoming xml payload to the destination queue (q).
    3. Now i am able to see the published payload on the console using monitoring option of the queue.
    4. Now i have created the proxy service and gave the same url as given for BS (jms://localhost:7001/cf/q).
    5.After activating the session the Messege Current Count on weblogic console is now coming 0 as i think it's being consumed up by the proxy service, but I am not able to see the consumed message.
    6.I want to do some processing on the message, how to go about this?
    My requirement is that i wanted to store some ID in a queue and used that particular id /consume that particaular id in some other proxy service .

    Anuj,
    I tried one more flow ...
    My resources are:
    1.BS :BSQ_Push
    2.PS :PS_Read_Message
    3.PS: PS_Publish_Message
    I edit the pipeline of PS_Publish_Message and made a route to PS_Publish_Message service and added some more actions and i am listing up all the actions below step by step
    Message Flow for PS_Publish_Message
    a. Postiing Message In Queue stage:
    Publish to [ BSQ_Push ] used , and Request Actions used : Log [ $body ]
    b. Route to [ PS_Read_Messege ]
    Message Flow for PS_Read_Message :
    a. Reading Message Stage :
    Log [$body  ]
    But at the end my logs are as follows when i run the PS_Publish_Message wth a request as <id>Abhinav</id> :
    ####<Apr 1, 2011 2:19:50 PM IST> <Error> <ALSB Logging> <Abhinav9639-g15> <AdminServer> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <62e9b948932bcb91:7dc8e539:12f0f9d195c:-8000-0000000000043f89> <1301647790389> <BEA-000000> < [Publishing Messege Pipeline, Publishing Messege Pipeline_request, Postiing Messege In Queue, REQUEST] ||||||||||||Posting Messege In Queue ||||||||||: <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <id>Abhinav</id>
    </soapenv:Body>>
    ####<Apr 1, 2011 2:19:50 PM IST> <Error> <ALSB Logging> <Abhinav9639-g15> <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <62e9b948932bcb91:7dc8e539:12f0f9d195c:-8000-0000000000043f89> <1301647790551> <BEA-000000> < [Reading Queue Pipeline, Reading Queue Pipeline_request, Reading Message, REQUEST] ---------------------Log For ID in Read Proxy Flow--------------------------------: <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <id>Abhinav</id>
    </soapenv:Body>>
    ####<Apr 1, 2011 2:19:50 PM IST> <Error> <ALSB Logging> <Abhinav9639-g15> <AdminServer> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <62e9b948932bcb91:7dc8e539:12f0f9d195c:-8000-0000000000043f89> <1301647790578> <BEA-000000> < [Reading Queue Pipeline, Reading Queue Pipeline_request, Reading Message, REQUEST] ---------------------Log For ID in Read Proxy Flow--------------------------------: <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>>

  • Receive activity pending when trying to consume message from Queue

    Hi ,
    I'm using a BPEL process to publish and subscribe message into a queue using JMS adapter.The messages in Queue are produced and consumed properly . But the BPEL process is still running, with a receive activity used to consume that queue, in pending state. The schema used throughout the BPEL and JMS adapter are the same.
    Edited by: user13829970 on May 8, 2012 2:07 AM

    Make sure you use the same schema and same queue name while configuring the Producer JMS Adapter and also the Consumer JMS Adapter
    And in the JMS Consumer Composite, define the interface of the BPEL based on the WSDL of the JMS Adapter (service) and then wire the BPEL and the JMS Adapter. Make sure under the receive activity, the create instance checkbox is checked.
    Hope this helps
    N

  • Message Driven bean: message always removed from queue

    We use MDB to dequeue messages from database queue (AQ) and want to handle errors: if the transaction rolls back, message should have retry_count updated and after defined retries should move to exception queue.
    The problem is, that with all combinations of transactions settings, the message is removed from queue before onMessage is called. If I use Container managed transactions with Mandatory transaction attribute, call to setRollbackOnly fails with message "java.lang.IllegalStateException: Cannot call setRollbackOnly() current thread is NOT associated with a transaction."
    How can I write a MDB, which can commit or rollback message depending on whether exception is or is not thrown? I use JDev 10.1.3.
    Thanks,
    Viliam
    Here are my files:
    ejb-jar.xml:
    <?xml version = '1.0' encoding = 'windows-1250'?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
      <enterprise-beans>
        <message-driven>
          <description>Message Driven Bean</description>
          <display-name>SendSMSBean</display-name>
          <ejb-name>SendSMSBean</ejb-name>
          <ejb-class>sk.transacty.cc.ejb.SendSMSBeanBean</ejb-class>
          <transaction-type>Container</transaction-type>
          <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
          <message-driven-destination>
            <destination-type>javax.jms.Queue</destination-type>
          </message-driven-destination>
          <resource-ref>
            <res-ref-name>jdbc/CCDataSource</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
          </resource-ref>
        </message-driven>
      </enterprise-beans>
      <assembly-descriptor>
        <container-transaction>
          <method>
            <ejb-name>SendSMSBean</ejb-name>
            <method-name>*</method-name>
          </method>
          <trans-attribute>Mandatory</trans-attribute>
        </container-transaction>
      </assembly-descriptor>
    </ejb-jar>orion-ejb-jar.xml:
    <?xml version = '1.0' encoding = 'windows-1250'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar>
      <enterprise-beans>
        <message-driven-deployment max-instances="1" name="SendSMSBean" connection-factory-location="java:comp/resource/jmsAQ/QueueConnectionFactories/aqQue" destination-location="java:comp/resource/jmsAQ/Queues/msg_queue" listener-threads="1" min-instances="0"/>
      </enterprise-beans>
      <assembly-descriptor>
        <default-method-access>
          <security-role-mapping impliesAll="true" name="<default-ejb-caller-role>"/>
        </default-method-access>
      </assembly-descriptor>
    </orion-ejb-jar>

    As far as I know XMLType JMS messages are not supported when using OJMS. They might be for OC4J 10.1.3, but I thought it's an AQ limitation rather than an OC4J one.. To be sure you might just log a TAR on Metalink.
    hth,
    Bastiaan

  • MDB messages dont get processed from Queues when involving a remote Topic in transaction

    Using WLS 6.1 SP4 on winXP Pro boxes, I have come across a peculiar problem:
              I have several MDBs that process ObjectMessages from queues and forward their payload (wrapped in another new ObjectMessage) to other queues, all of which are located within the same WLS server.
              Right now I'm adding a new MDB that gets messages from a remote Topic with a durable subscription, and forwards the payload to local queues after some processing.
              When the Topic is local as well, there is no problem. But when the Topic is set up in a remote machine, only the MDB that has the remote durable subscription works the way it should. It receives the remote message and forwards it to the corresponding local queue. But then the messages in those local queues dont get processed. The 'Messages Received' count rises and the 'Messages' count stays at 0, as if the messages had been correctly processed and acknowledged, but no onMessage() method is called besides the one from the MDB that has the durable subscription to the remote Topic (I can tell because there's no further processing from the queue those messages get put in). It's as if those messages were simply received and acknowledged without being passed to other MDBs by WLS.
              * All queue MDBs use Required container-managed transaction management and auto-acknowledge
              * All queue MDBs have default durability for their queue subscriptions
              * The topic MDB has a durable subscription stored in a filestore
              * Lookup of the remote Topic is done via JNDI
              Since the processing and forwarding of messages occurs the way it should when everything is local, I am inclined to believe one of two things:
              a) There's some issue with the way WLS treats messages (or even just payloads) when they come from a remote server
              b) WLS is doing something I'm not aware of when propagating a transaction that begins with the delivery of a message from a remote JMS Topic when it involves further forwarding of messages in local JMS Queues.
              Any help will be appreciated.
              regards,
              .munir estevane
              

    Is the durable subscriber forwarder rolling back its transactions?
              That would cause the behavior you describe (eg the message gets
              placed in the queue, but is never made visible). What do
              the pending counts on the destination queue look like?
              Munir Estevane wrote:
              > Using WLS 6.1 SP4 on winXP Pro boxes, I have come across a peculiar problem:
              >
              > I have several MDBs that process ObjectMessages from queues and forward their payload (wrapped in another new ObjectMessage) to other queues, all of which are located within the same WLS server.
              > Right now I'm adding a new MDB that gets messages from a remote Topic with a durable subscription, and forwards the payload to local queues after some processing.
              >
              > When the Topic is local as well, there is no problem. But when the Topic is set up in a remote machine, only the MDB that has the remote durable subscription works the way it should. It receives the remote message and forwards it to the corresponding local queue. But then the messages in those local queues dont get processed. The 'Messages Received' count rises and the 'Messages' count stays at 0, as if the messages had been correctly processed and acknowledged, but no onMessage() method is called besides the one from the MDB that has the durable subscription to the remote Topic (I can tell because there's no further processing from the queue those messages get put in). It's as if those messages were simply received and acknowledged without being passed to other MDBs by WLS.
              >
              > * All queue MDBs use Required container-managed transaction management and auto-acknowledge
              > * All queue MDBs have default durability for their queue subscriptions
              > * The topic MDB has a durable subscription stored in a filestore
              > * Lookup of the remote Topic is done via JNDI
              >
              > Since the processing and forwarding of messages occurs the way it should when everything is local, I am inclined to believe one of two things:
              > a) There's some issue with the way WLS treats messages (or even just payloads) when they come from a remote server
              > b) WLS is doing something I'm not aware of when propagating a transaction that begins with the delivery of a message from a remote JMS Topic when it involves further forwarding of messages in local JMS Queues.
              >
              > Any help will be appreciated.
              >
              > regards,
              > .munir estevane
              

  • Code to Retrieve the message from Queue in Oracle BPEL

    Actually I am placing the Message into JMS Queue using JMS Adapter.After Placing the message,I need to retrieve the placed message from same queue.
    Right now I am using the Receive Activity and the JMS Adapter to retrieve the message from Queue.But my receive activity is always in the waiting state itself and I am not able to retrieve the message from queue.What might be the issue????
    Can anybody give me a better suggestion so that I can go ahead??
    Thanks in advance for your help.

    Hi Raja,
    Is the process a empty bpel process which is used to get the message from the MQ?
    Regards
    Surya

  • Process take a while to go from Queued to Initiated

    Just wondering if anyone had any suggestions about how to speed up processes going from queued to initiated. E.g. you kick off a process, and it takes 15 or more more seconds to change status from queued to initiated and then start processing.
    Things I've tried include increasing max concurrent processes for that process type (e.g. App Engine) and also increasing the priority to high but this occurs even when there is just one process running on the process scheduler (so there is no contention with other processes).
    Edited by: praj.basnet on Jul 29, 2011 4:27 PM

    You may want to reduce the "Sleep time" of the process scheduler if you did not try it yet.
    Find out more :
    http://download.oracle.com/docs/cd/E24150_01/pt851h2/eng/psbooks/tprs/book.htm?File=tprs/htm/tprs09.htm#_645ac7bd_130abba9027__6475
    Nicolas.

  • Polling message from Queue

    Hi B2B Gurus,
    Is there any way that I could control polling messages from Queue(AQ/JMS).
    (e.g) There are 1000 messages in the queue, I want to process 10 at a time.
    Are there any settings that can I do so that i can poll 10 messages at a time.
    Thanks for your help in Advance.
    Regards,
    Priyanka

    Polling is only based on the interval and not based on size. Please raise an ER.

  • Does somebody has working example how retrieve ALL message ids from queue

    hello,
    i'm having problems retrievieng all message id's from queue using APPQ_MIB. Point
    is that i can't get cursor variable work. Somebody possibly has working example
    or knows how it is done in qmadmin? I'm using Tuxedo 8.0.

    The default CURSORHOLD time is 120 seconds. Are you making your second
    request within that time? And make sure that you change TA_OPERATION to
    GETNEXT.
    Janis Kovalevskis wrote:
    Actually there is no debugging required it is enough to use ud32. I created sample
    file (see attach), where is what i'm sending to MIB. For Part 1 everything is
    fine- i get first ~200 message id's and cursor variable, but when i send Part
    2 (substituting TA_CURSOR with returned value) nothing happens. Returned buffer
    is something like:
    TA_ERROR     0
    TA_MORE     0
    TA_OCCURS     0
    TA_CLASS     T_APPQMSG
    You can even send cursor variable TA_CURSOR like: "..TMIB0: 0x99999999" and same
    response will be returned.
    It seems T_APPQMSG is just ignoring those cursors and thats all. Any ideas?
    Scott Orshan <[email protected]> wrote:
    I think it would be easier for us to debug what you have than to write
    a
    new example from scratch. Please post a code sample that is not working
    for you. Make sure you use GETNEXT is you are using the cursor.
         Scott Orshan
    Janis Kovalevskis wrote:
    hello,
    i'm having problems retrievieng all message id's from queue using APPQ_MIB.Point
    is that i can't get cursor variable work. Somebody possibly has workingexample
    or knows how it is done in qmadmin? I'm using Tuxedo 8.0.------------------------------------------------------------------------
    -- Part 1 --
    SRVCNM     .TMIB
    TA_CLASS     T_APPQMSG
    TA_OPERATION     GET
    TA_LMID     SITE1
    TA_QMCONFIG     /ora4/iia/cfg/QUE
    TA_APPQSPACENAME     QSPACE
    TA_APPQNAME     STIP_ISS_SAF
    TA_CURSORHOLD     300
    -- Part 2 --
    SRVCNM     .TMIB
    TA_CLASS     T_APPQMSG
    TA_OPERATION     GETNEXT
    TA_CURSOR     ..TMIB0: 0x12345678
    TA_CURSORHOLD     300

  • HP 2540 all in one, job disapperar from queue, no print

    Hi guys, I bought a HP 2540 and I cant print anything, windows 8.1 64 bits.The printer is online and ready but the job disappear from queue after 1 second or I cant see them there. Just follow this article but still no luckhttp://support.hp.com/us-en/product/HP-Deskjet-2540-All-in-One-Printer-series/5295960/model/5295961/document/c04372450/ The test page was successfully printed. The behavior is the same with an usb cable or wireless. Thanks in advance.

    Tried that too:http://h30434.www3.hp.com/t5/Printer-All-in-One-Install-Setup/Deskjet-2540-not-printing/td-p/3526101 No luck with another drivers

  • Can a Web Service be Consumed from within JSX

    Hi all,
    In CS5, can a web service be consumed from within JSX, and if so - how?
    TIA,
    mlavie

    Kris,
    Thanks! Exactly what I needed!
    mlavie

  • Remove message from queue for rule based subscriber

    Hi ,
    I created a rule based subscription for one xx_Queue when i am dequeing trying dequeue.conditions like REMOVE it's saying i can mention either dequeue condition or rule based .So if i didn't give REMOVE condition i am able to dequeue but next time when i run again the old message is coming because the message was not removed from queue.So how can i approach that one?

    No version number.
    No DDL.
    And you want us to guess at the actual message when you write: "it's saying i can mention either dequeue condition or rule based."
    Not possible.
    Unless you can see one of us standing behind your chair reading your monitor ... you need to provide every single relevant unknown.
    If you do not know what is relevant, like the actual message, ask a coworker to help you.

  • Netflix problem using Firefox 9.0.1 (mac), unable to remove items from queue but I can from Safari. Anyone had this problem? Talked to Netflix they can remove items on their end.

    iMac OS 10.5.8, 2.66 GHz, 4gb memory. I've tried with adblock on and off. I use HTTPS Everywhere.
    Netflix suggested it might be a browser issue and to try Safari. I was able to remove items from queue using Safari.

    Addendum: The .jpg file, below, shows the netflix popup I get when trying to delete a video.

  • Production order with components consumed from vendor consignment stock

    Hi expert,
    I have a production order with components and some of the components should be consumed from vendor consignment stock.
    When the order is created/released : is there  a possibility to have those components created with "special stock indicator" = 3 (consignement stock) by default?
    Thanks,
    P.

    Dear Pete,
    In my understanding it's not possible to populate this value as 3 - consignment stock in the component overview.This has to be
    done manually.
    Check in this way,by indicating a value in any of the material master field(for eg ABC indicator in MRP1 view) and if there's some
    value,then while saving the system populates for all those materials with this value as 3 by using some user exit or BADI.
    I'm not sure,it's only an idea,check and revert
    Regards
    Mangalraj.S

Maybe you are looking for

  • Error when logging into forum

    Past few days get error when trying to login to forum. An error occurred during a connection to pingsso.lithium.com. SSL received a weak ephemeral Diffie-Hellman key in Server Key Exchange handshake message. (Error code: ssl_error_weak_server_ephemer

  • MacBook Pro Retina - Images in PS look great, but when uploaded to web too big and distorted

    Part of the reason I hated using my Mac for graphic and web design is that when I create images in adobe photoshop everything looks amazing. However, when I upload them to the web, they are way too big and look distorted, this includes text. I'm tryi

  • Which Audio Setting for MPEG share for use on PC or burning to DVD???

    I just "shared" a movie (a slide and video show with soundtrack edited on Premier Elements 8)  to "Use for playback on this PC or burning to DVD"  (created an MPEG).  The audio export didn't work though.  I used the NTSC DVD Standard preset that give

  • IPhoto 6 and HP Photosmart A640

    I purchased an HP Photosmart A640 photo printer yesterday and I am having trouble getting photos to print directly from iPhoto (I'm running iPhoto 6). I got the printer to connect to my MacBook Pro with bluetooth, and I also have it plugged in via US

  • SQL Azure Data Sync stuck in Processing State since 5 Sep 2014

    Hi, I've a sync group stuck in "processing" state since 5 Sep 2014, have tried to restart the client PC, restarted the sync service and also tried to regenerate the sync agent key, but still in vain. Would anyone please help me to figure it out what'