JMS queue consumer challenge

Hi there,
          I have met a pretty challenging problem in JMS queue consumer and
          would like to know if any JMS lovers in the group know about it.
          We have queue receiver listening on queue which contains a number of
          mugs.
          Once a msg is received (onMessage returns), the msg is handed over to
          a worker thread from a thread pool.
          Essentially there are two parts of the problem:
          1. We want kind of flow control - only x number of msg can be
          processed at a given time. This can be resolved by using semaphore.
          However, there might be better solution out there. Anyhow, this is
          less an issue than the second part -
          2. As we know client_acknowledge happens at the session level:
          Acknowledging a consumed message automatically acknowledges the
          receipt of all messages that have been consumed by its session. For
          example, if a message consumer consumes ten messages and then
          acknowledges the fifth message delivered, all ten messages are
          acknowledged. 
          -- this is the problem -- we want to acknowledge each msg
          individually so that only the processed msg is acknowledged although
          there are x number of msg being retrieved. By doing that we won't lost
          any msg in case the JMS client crashes.
          It is a challenge, isn't it? Might well not be one for you, if you
          know the trick. If you do, could you share with us? Thanks a lot.
          Mike
          

Just to be clear, I favor (2), where each worker thread has its own session and
          consumer.
          This naturally throttles, as there are only as many outstanding messages as
          worker-threads.
          BTW, be aware that it is against spec, and dangerous, to call acknowledge()
          outside of
          onMessage() - as this multi-threads the Session and Session's are not thread
          safe.
          Tom
          Tom Barnes wrote:
          > Actually you both are correct. The ack behavior is configurable on the
          > connection factory via the "AcknowledgePolicy", where the default is
          > what the spec requires (ack-all). Prior to 6.1
          > the behavior was what one would expect (ack-before).
          >
          > As for how to solve the problem at hand. I can think of three approaches:
          >
          > (1) use the current async consumer but set the ack-policy
          > to ack-before, and defer acknowledging a msg until all msgs before
          > it have finished their processing
          >
          > (2) use multiple synchronous consumers, one consumer per defered msg
          >
          > (3) use a single synchronous consumer, but dequeue transactionally,
          > one transaction per msg. suspend the transaction, then have
          > the worker thread resume the transaction once it finishes processing
          > the message and call commit. (Take care that the default
          > tran timeout is 30 seconds.)
          >
          > Shean-Guang Chang wrote:
          >
          > > Just to correct one assumption. Ack the fifth message will not ack message
          > > received after that (e.g. message 6, 7, 8, etc...). At least not WLS JMS.
          > > If this is not true for you please give details of your client code and
          > > version of WLS JMS you have. Thanks!
          > >
          > > "Mike" <[email protected]> wrote in message
          > > news:[email protected]...
          > > > Hi there,
          > > >
          > > > I have met a pretty challenging problem in JMS queue consumer and
          > > > would like to know if any JMS lovers in the group know about it.
          > > >
          > > > We have queue receiver listening on queue which contains a number of
          > > > mugs.
          > > > Once a msg is received (onMessage returns), the msg is handed over to
          > > > a worker thread from a thread pool.
          > > >
          > > > Essentially there are two parts of the problem:
          > > >
          > > > 1. We want kind of flow control - only x number of msg can be
          > > > processed at a given time. This can be resolved by using semaphore.
          > > > However, there might be better solution out there. Anyhow, this is
          > > > less an issue than the second part -
          > > >
          > > > 2. As we know client_acknowledge happens at the session level:
          > > > Acknowledging a consumed message automatically acknowledges the
          > > > receipt of all messages that have been consumed by its session. For
          > > > example, if a message consumer consumes ten messages and then
          > > > acknowledges the fifth message delivered, all ten messages are
          > > > acknowledged.
          > > > -- this is the problem -- we want to acknowledge each msg
          > > > individually so that only the processed msg is acknowledged although
          > > > there are x number of msg being retrieved. By doing that we won't lost
          > > > any msg in case the JMS client crashes.
          > > >
          > > > It is a challenge, isn't it? Might well not be one for you, if you
          > > > know the trick. If you do, could you share with us? Thanks a lot.
          > > >
          > > > Mike
          

Similar Messages

  • MDBs in 9.1 continue to consume JMS queues even after being deleted

    <b>We have an MDB application that reads a batch message off of a JMS queue, archives it in a database, parses the batch message into individual messages and writes them onto other JMS queues to be consumed by another application. Everything was running fine in Weblogic 8.1.5. However, due to problems with XA drivers and the MSDTC(predictable SQL server crashes), we decided to upgrade to Weblogic 9.1 to take advantage of the LLR option.</b>
              <b>First, we had an issue where our MDBs were causing the following exception:</b>
              <i>####<May 26, 2006 7:42:12 PM EDT> <Error> <JMX> <ist-clft2> <wltest1> <ExecuteThread: '1' for queue: 'default'> <<WLS Kernel>> <> <> <1148686932991> <BEA-149500> <An exception occurred while registering the MBean null.
              java.lang.IllegalArgumentException: Registered more than one instance with the same objectName : com.bea:ServerRuntime=wltest1,MessageDrivenEJBRuntime=RhapsodyMDB_DMBModule!JMSServer4@DMB_BEAN_QUEUE,Name=RhapsodyMDB_DMBModule!JMSServer4@DMB_BEAN_QUEUE,ApplicationRuntime=DataBrokerEAR1_2,Type=EJBPoolRuntime,EJBComponentRuntime=DataBrokerEJB new:[email protected] existing weblogic.ejb.container.monitoring.EJBPoolRuntimeMBeanImpl@7db003
                   at weblogic.management.jmx.ObjectNameManagerBase.registerObject(ObjectNameManagerBase.java:146)
                   at weblogic.management.mbeanservers.internal.WLSObjectNameManager.lookupObjectName(WLSObjectNameManager.java:133)
                   at weblogic.management.jmx.modelmbean.WLSModelMBeanFactory.registerWLSModelMBean(WLSModelMBeanFactory.java:86)
                   at weblogic.management.mbeanservers.internal.RuntimeMBeanAgent$1.registered(RuntimeMBeanAgent.java:104)
                   at weblogic.management.provider.internal.RegistrationManagerImpl.invokeRegistrationHandlers(RegistrationManagerImpl.java:205)
                   at weblogic.management.provider.internal.RegistrationManagerImpl.register(RegistrationManagerImpl.java:85)
                   at weblogic.management.runtime.RuntimeMBeanDelegate.register(RuntimeMBeanDelegate.java:320)
                   at weblogic.management.runtime.RuntimeMBeanDelegate.<init>(RuntimeMBeanDelegate.java:257)
                   at weblogic.management.runtime.RuntimeMBeanDelegate.<init>(RuntimeMBeanDelegate.java:222)
                   at weblogic.ejb.container.monitoring.EJBPoolRuntimeMBeanImpl.<init>(EJBPoolRuntimeMBeanImpl.java:32)
                   at weblogic.ejb.container.monitoring.MessageDrivenEJBRuntimeMBeanImpl.<init>(MessageDrivenEJBRuntimeMBeanImpl.java:49)
                   at weblogic.ejb.container.manager.MessageDrivenManager.initialize(MessageDrivenManager.java:503)
                   at weblogic.ejb.container.manager.MessageDrivenManager.setup(MessageDrivenManager.java:120)
                   at weblogic.ejb.container.manager.MessageDrivenManager.setup(MessageDrivenManager.java:146)
                   at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.createMDManager(MessageDrivenBeanInfoImpl.java:1481)
                   at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.createDDMDManagers(MessageDrivenBeanInfoImpl.java:1378)
                   at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.onDDMembershipChange(MessageDrivenBeanInfoImpl.java:1285)
                   at weblogic.jms.common.CDS$DD2Listener.listChange(CDS.java:454)
                   at weblogic.jms.common.CDSServer$DDHandlerChangeListener.statusChangeNotification(CDSServer.java:167)
                   at weblogic.jms.dd.DDHandler.callListener(DDHandler.java:318)
                   at weblogic.jms.dd.DDHandler.callListeners(DDHandler.java:344)
                   at weblogic.jms.dd.DDHandler.run(DDHandler.java:282)
                   at weblogic.jms.common.SerialScheduler.run(SerialScheduler.java:37)
                   at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
              >
              ####<May 26, 2006 7:42:13 PM EDT> <Info> <EJB> <ist-clft2> <wltest1> <ExecuteThread: '1' for queue: 'default'> <<WLS Kernel>> <> <> <1148686933069> <BEA-010060> <The Message-Driven EJB: RhapsodyMDB has connected/reconnected to the JMS destination: weblogic.jms.DMB_BEAN_QUEUE.></i>
              <b>
              Generally this happend after there were cluster communication issues. Multi-cast messages were lost and our MDB reconnects to the JMS queues as indicated by the below log:</b>
              <i>####<May 30, 2006 5:19:06 PM EDT> <Info> <EJB> <AMTC-RAP-STG3> <RAPBEA1S> <[ACTIVE] ExecuteThread: '54' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1149023946040> <BEA-010060> <The Message-Driven EJB: DataBrokerMDB has connected/reconnected to the JMS destination: weblogic.jms.PHINMS_DMB_QUEUE.>
              ####<May 30, 2006 5:19:10 PM EDT> <Info> <Cluster> <AMTC-RAP-STG3> <RAPBEA1S> <[ACTIVE] ExecuteThread: '22' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1149023950228> <BEA-000112> <Removing RAPBEA3S jvmid:720875810499147484S:cmts-rap-bea3:[7005,-1,-1,-1,-1,-1,-1]:DMBstg:RAPBEA3S from cluster view due to timeout.>
              ####<May 30, 2006 5:19:11 PM EDT> <Info> <Cluster> <AMTC-RAP-STG3> <RAPBEA1S> <[STANDBY] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1149023951009> <BEA-000115> <Lost 2 multicast message(s).>
              ####<May 30, 2006 5:19:11 PM EDT> <Info> <Cluster> <AMTC-RAP-STG3> <RAPBEA1S> <[ACTIVE] ExecuteThread: '22' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1149023951040> <BEA-000111> <Adding RAPBEA3S with ID 720875810499147484S:cmts-rap-bea3:[7005,-1,-1,-1,-1,-1,-1]:DMBstg:RAPBEA3S to cluster: DMBstg_cluster view.></i>
              <b>
              This would cause the queues to eventually have hundreds of consumers and cause the server to fail.
              Basically, it seems as though the MDBs that are supposed to stop continue and attempt to process, while new threads connect to the JMS queues.
              I tried undeploying our application and deleted it from the configuration. However there were consumers still on the respective queues and when I sent messages, I got an error indicating a "Class Not Found exception" due to the fact that the EJB was undeployed and deleted from the configuration, however the MDB component was not and continued to listen for messages. In 8.1.5, as soon as the application was undeployed, there were zero consumers on the JMS queues.
              I have read the posts about a soon to be released fix that would have the MDBs connect only to the queues locally and not go out the the cluster. Would this fix my issue?
              Is there something in the deployment descriptor to configure that will cause it to disconnect and now spawn so many consumers to the JMS queues?
              Why is it that the number of MDB consumers on the JMS queues stayed static in 8.1.5, but they are erratic in 9.1 even after I set our 9.1 server to use the 8.1.5 execute queue policy. Help would be much appreciated.</b>

    I recommend contacting customer support. There's a known problem with MDBs listening to distributed destinations that are local to the same cluster as the MDB, you're problem may be related (the clue is that the stack trace contains jms.dd.DDHandler.callListeners()). The problem is that the MDB connects to all physical queues in a distributed destination rather than just the local queue.
              Tom

  • Exception in the XML consuming from JMS Queue

    In the CEP application we have a business flow like we want to consume an xml message from the JMS queue.
    While CEP is consuming the message sometimes we are getting an exception.
    But this issue occurs rarely and we have no idea about the root cause.
    I am attaching the trace of this exception.
    It seems this exception is from weblogic server itself.
    Also this could be an interface problem, since its showing a casting error.
    The Bug description:
    When we send a meter event through SOAP UI in the CEP visualizer when the event is consumed CEP also shows this exception.
    This may not halt the analysis process of the event, but this unwanted piece of code/lines have to be avoided.
    <OutageEvent xmlns:ns1="http://www.accenture.com/INDE"; xmlns:wsa="http://www.w3.org/2005/08/addressing"; xmlns="http://www.accenture.com/INDE"><meterId xmlns="">203</meterId><outageType xmlns="">Permanent Outage</outageType><premiseId xmlns="">1111</premiseId><timeEvent xmlns="">2010-07-30T</timeEvent><heName xmlns="">SAMPLEHE</heName></OutageEvent>
    <Jul 30, 2010 11:01:50 AM IST> <Error> <JMSAdapter> <BEA-2041118> <Setup for JMS task for destination JMS_OI_MeterState_MeterEvent_Queue at provider t3://10.212.182.30:8002 failed with exception: weblogic.jms.common.JMSException: [JMSClientExceptions:055039]A system error has occurred. The error is java.lang.ClassCastException: weblogic.workarea.StringWorkContext
    weblogic.jms.common.JMSException: [JMSClientExceptions:055039]A system error has occurred. The error is java.lang.ClassCastException: weblogic.workarea.StringWorkContext
    at weblogic.jms.client.JMSSession.handleException(JMSSession.java:3121)
    at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:650)
    at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:526)
    at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:405)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
    at com.bea.core.asyncbeans.internal.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:59)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
    at com.bea.core.asyncbeans.internal.WorkManagerTaskExecutor$1.run(WorkManagerTaskExecutor.java:38)
    at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:196)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused By: java.lang.ClassCastException: weblogic.workarea.StringWorkContext
    at weblogic.rjvm.MsgAbbrevInputStream.readContext(MsgAbbrevInputStream.java:243)
    at weblogic.workarea.spi.WorkContextEntryImpl.<init>(WorkContextEntryImpl.java:47)
    at weblogic.workarea.spi.WorkContextEntryImpl.readEntry(WorkContextEntryImpl.java:97)
    at weblogic.workarea.WorkContextLocalMap.receiveRequest(WorkContextLocalMap.java:151)
    at weblogic.jms.common.JMSWorkContextHelper.readWorkContext(JMSWorkContextHelper.java:89)
    at weblogic.jms.common.MessageImpl.readExternal(MessageImpl.java:2275)
    at weblogic.jms.common.TextMessageImpl.readExternal(TextMessageImpl.java:354)
    at weblogic.jms.common.JMSConsumerReceiveResponse.readExternal(JMSConsumerReceiveResponse.java:133)
    at weblogic.messaging.dispatcher.DispatcherObjectHandler.readResponse(DispatcherObjectHandler.java:154)
    at weblogic.messaging.dispatcher.DispatcherProxy.unmarshalResponse(DispatcherProxy.java:269)
    at weblogic.messaging.dispatcher.DispatcherProxy.dispatchSyncTranFuture(DispatcherProxy.java:134)
    at weblogic.messaging.dispatcher.DispatcherWrapperState.dispatchSyncTran(DispatcherWrapperState.java:338)
    at weblogic.messaging.dispatcher.DispatcherWrapperState.dispatchSyncNoTran(DispatcherWrapperState.java:386)
    at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:59)
    at weblogic.jms.client.JMSSession.receiveMessage(JMSSession.java:886)
    at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:647)
    at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:526)
    at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:405)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
    at com.bea.core.asyncbeans.internal.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:59)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
    at com.bea.core.asyncbeans.internal.WorkManagerTaskExecutor$1.run(WorkManagerTaskExecutor.java:38)
    at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:196)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >
    11:01:50,548 INFO MeterInputConverter : 81 - Accepted the input xml :<?xml version="1.0" encoding="UTF-8" ?><MeterEvent xmlns:inde="http://www.accenture.com/INDE"; xmlns:wsa="http://www.w3.org/2005/08/addressing"; xmlns="http://www.accenture.com/INDE">;
    <meterId xmlns="">103</meterId>
    <outageType xmlns="">RESUME</outageType>
    <premiseId xmlns="">1111</premiseId>
    <timeEvent xmlns="">2010-07-30T</timeEvent>
    <lastGasp xmlns="">false</lastGasp>
    <heName xmlns="">CURRENT</heName>
    </MeterEvent>

    Hi,
    I will forward this to the weblogic JMS team, to see if they have any insight for us.
    Regards,
    Seth

  • How to pick(or consume) messages from Woblogic JMS Queue only when DB is UP

    Hi,
    I have a requirement to pick(or consume) messages from Woblogic JMS Queue only when DB is UP.
    When DB is down, messages should remain in queue. When DB is up, messaged should be picked on scheduler basis.
    We are using SOA suite 11g(BPEL or mediator,JMS Adapter).
    What is the best way to achive it in SOA 11g.
    I tried, but when I setup a Consumer, there is no control over there. Messages are picked automatically.
    Please advise.
    Thanks
    Ram

    something wrong with the design.
    why dont you set the retry options in the fault policies?
    So if the external DB is down you could reprocess them after specified interval or make it go to human retry queue.
    Then you could use SOA api to retry all of them.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Consumer number for a JMS queue continues to grow

              I am using WLS 7.0 SP2. I have a JMS Queue and number of consumers continues to
              grow.
              Is there any way to stop it from growing? If not, should I be concerned about
              the memory usage by those consumers?
              Thanks.
              Rick
              

              Tom,
              You are right on JMS resources. We found that developer didn't close JMS session
              and conneciton which caused the memory leak. Now it has being running more than
              10 hours without crashing.
              Thanks.
              Rick
              Tom Barnes <[email protected]> wrote:
              >
              >Rick Chang wrote:
              >> I am using WLS 7.0 SP2. I have a JMS Queue and number of consumers
              >continues to
              >> grow.
              >>
              >> Is there any way to stop it from growing?
              >
              >No.
              >
              >> If not, should I be concerned about
              >> the memory usage by those consumers?
              >
              >Before jumping to conclusions though, make sure
              >that you are looking at the right statistic, there
              >are three for consumer count:
              > current -- active consumer count
              > high -- highest active consumer count
              > total -- total consumers ever created
              > (ever increasing by definition)
              >
              >If you are looking at "current"
              >the statistics point to a likely memory/resource leak.
              >Perhaps some part of your application is failing to close
              >its JMS resources when it is finished with them.
              >
              >>
              >> Thanks.
              >>
              >> Rick
              >
              

  • Reg: Consuming missing data by JMS queue.

    Hi,
    System1 is configured to send XML messages though JMS queue to my WL-server. But some times i have observed missing of message consumption at my server end.
    what may be the reason? How can i consume the missing XML messages? is there any place where missing data will be stored?
    Please advise...!
    Regards,
    Sk

    When I meant there is an expiry time set with the message. It means the message is received by your WLS, but you are not able to see it because the message has expired.
    You can only view the messages that are not expired.
    If you think you are not even receiving the message, may be you can enable debugging on the WLS JMS and see if you are able to get more details in the server logs.
    Please refer - http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jms_admin/troubleshoot.html#wp1128871
    Thanks,
    Patrick

  • Program to consume the JMS queue

    Hi, I' m new to WebLogic stuff. Got a question over here. There's a JMS queue that we want to have a program (not those built in stuff from weblogic) to see if they re consumed. Similar stuff would be displayed like
              <b>ABCD Queue consumers: 1 / consumers high: 0 ...messages: 10 / messages received: 19........</b>
              as if we get into the console page to check the JMS queues.
              I've got no clues yet. We don't wanna check the number of files from C:\Original and the destination folder C:\Destin......if so, it'd be an easy task but that s not what we wanted....

    As with any WebLogic subsystem, you can get all statistics programmatically using standard JMX mbeans (see the JMX developer guide). The console uses these beans, as does the WLST scripting language. In addition, there are helper methods in the public weblogic.jms.extensions package that simplify access to these beans.
              I think there are various mbean and WLST samples on dev2dev, including one called "JMSStats.java". Note that JMSStats.java, and some other samples were written for versions 8.1 and earlier. They use deprecated methods that don't have access to all runtime statistics for 9.0 and later versions.
              Tom

  • Re: Consuming jms queue synchronously in SOA11g

    Hi
    I have the below requirement
    In Queue total 5 messages are there, in those 3 are with same ID and 2 are with same ID.
    My requirement is that for the above 5 messages only two BPEL processes should be created for each ID.
    1st BPEL consumes 3 messages
    2nd BPEL consumes 2 messages
    Please give me idea to do this.
    Thanks in Advance
    Vamsi..

    Hello friend,
    So, according to your scenario...you are producing messages into the Queue using JMS Adapter Outbound Operation ( JMS adapter is on the references side)
    And as we know, in order to read the message from JMS Queue we use JMS Adapter and that would be inbound operation (JMS adapter is on the services side)
    So, when we define a JMS adapter in our composite as consume message operation...then the JMS adapter will be on the services side...then we declare our BPEL interface based on the WSDL of JMS Adapter (Consume operation). SO by default the interface of the BPEL would be one-way i.e., just fire and forget. So, lets say you wrote 10 messages to the Queue. So, the consuming BPEL would take all messages at a time...as you said there would be 10 instances....
    So, if you make the interface of the BPEL to synchronous and also you just need to reply back ( any dummy message) to JMS adapter....just keep a reply activity at the end of the BPEL ...so by doing this...unless and until it gets the response from the synchronous BPEL (consuming BPEL), the JMS adapter doesn't give the next message in the Queue to the BPEL...that means at any point of time only one BPEL instance would be running for you which is what we want to achieve...And you can see this clearly in the Queue in the weblogic admin console...This is called throttling the JMS adapter....This works...
    And one more important thing to be considered is...taking the synchronous process time out thing...as we know by default the client of the synchronous process cannot wait for more than 45 seconds...may be if you want more time to process ...you can change that in EM console...BPEL properties in SOA administration...
    I think it is syncMaxWaitTime..change that may be to 300...
    Try this...Hopefully this should work for you..and let us know ...
    Hope this helps...
    Thanks,
    N

  • JMS-130 JMS queue cannot be multi-consumer enabled

    error:
    queue = ((AQjmsSession)t_sess).getQueue("tmp", "tmp_queue");
    pl/sql code:
    BEGIN
    DBMS_STREAMS_ADM.SET_UP_QUEUE(
    queue_table => 'tmp_queue_table',
    queue_name => 'tmp_queue');
    END;
    BEGIN
    SYS.DBMS_AQADM.CREATE_AQ_AGENT(
    agent_name => 'explicit_dq');
    END;
    BEGIN
    DBMS_AQADM.ENABLE_DB_ACCESS(
    agent_name => 'explicit_dq',
    db_username => 'tmp');
    END;
    DECLARE
    subscriber SYS.AQ$_AGENT;
    BEGIN
    subscriber := SYS.AQ$_AGENT('explicit_dq', NULL, NULL);
    SYS.DBMS_AQADM.ADD_SUBSCRIBER(
    queue_name => tmp.tmp_queue',
    subscriber => subscriber);
    END;
    I search in forums, google but i can not find solution. Any idea?
    regards

    Bill,
    I could be mistaken, but as far as I know, you can only access JMS queues from java. In other words, "queue_payload_type" needs to be: SYS.AQ$_JMS_OBJECT_MESSAGE
    Good Luck,
    Avi.

  • How to keep a back up of messages from the JMS queues?

    Hi,
    I need to keep a back up of messages which are coming in the JMS queue before they get consumed. This is for recovery purpose.
    I checked file store option but it doesnt have any time stamp on messages so dont know how to trace back messges if needed from file store.
    Please let me know if you guys have any idea to handle this.
    Thanks in advance
    Bips

    No. Not with Time Machine at least.
    If you tell Time Machine to backup the external then you will have it.
    Or you can manually copy it to another disk for storage outside of Time Capsule/TimeMachine.
    Allan

  • How to configure a JMS Queue

    Hi,
    I have an EAR file thai includes an EJB 3.0 module with a MDB. I use a Queue.
    This is my code,
    @Resource(mappedName = "jms/NotificationQueue")
    private Queue notificationQueue;
    @Resource(mappedName = "jms/NotificationQueueFactory")
    private ConnectionFactory notificationQueueFactory;
    public Customer update(Customer customer){
    Customer updated = em.merge(customer);
    try {
    sendJMSMessageToNotificationQueue(updated);
    } catch (JMSException ex) {
    Logger.getLogger(CustomerSessionBean.class.getName()).log(Level.SEVERE, null, ex);
    System.out.println("Customer updated in CustomerSessionBean!");
    return updated;
    private Message createJMSMessageForjmsNotificationQueue(Session session, Object messageData) throws JMSException
    //Modified to use ObjectMessage instead
    ObjectMessage tm = session.createObjectMessage();
    tm.setObject((Serializable) messageData);
    return tm;
    private void sendJMSMessageToNotificationQueue(Object messageData) throws JMSException
    Connection connection = null;
    Session session = null;
    try
    connection = notificationQueueFactory.createConnection();
    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    MessageProducer messageProducer = session.createProducer(notificationQueue);
    messageProducer.send(createJMSMessageForjmsNotificationQueue(session, messageData));
    finally
    if (session != null)
    try
    session.close();
    catch (JMSException e)
    Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Cannot close session", e);
    if (connection != null)
    connection.close();
    layed inside a stateless EJB 3.0.
    And the MDB looks as follow,
    @MessageDriven(mappedName = "jms/NotificationQueue", activationConfig = {
    @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
    public class NotificationBean implements MessageListener {
    public NotificationBean() {
    public void onMessage(Message message)
    try
    Object msgObj = ((ObjectMessage)message).getObject();
    if (msgObj != null)
    Customer customer = (Customer)msgObj;
    System.out.println("Customer with the following details has been updated:");
    StringBuilder sb = new StringBuilder();
    sb.append("Customer ID=");
    sb.append(customer.getCustomerId());
    sb.append(", ");
    sb.append("Name=");
    sb.append(customer.getName());
    sb.append(", ");
    sb.append("Email=");
    sb.append(customer.getEmail());
    System.out.println(sb.toString());
    catch (JMSException ex)
    Logger.getLogger(NotificationBean.class.getName()).log(Level.SEVERE, null, ex);
    I have configured both "jms/NotificationQueue" and "jms/NotificationQueueFactory" inside OC4J server.
    But when I try to deploy the EAR file, the server gives me the following error,
    Operation failed with error: No destination location set for message-driven bean NotificationBean
    How must I do to let the EAR file be deployed?
    Thanks in advance
    Jose

    Mingzhuang
    I want to configure a error queue for weblogic jms topic. Wanted: The message goes to error destination when messages have expired or reached their redelivery limit.
    1. using jms transport configure proxy service:
    Retry Count :3
    Retry Interval:10
    Error Destination: ErrorTopic
    Expiration olicy: RedirectUnlike File/SFTP, JMS proxy service definition does not have the concept of Error Destination. To accomplish similar functionality go to JMSQ on (for which proxy is configured) server console (http://localhost:7001/console) and configure the Error Destination. Following URL will help in how to configure JMS Q.
    http://edocs.bea.com/wls/docs103/ConsoleHelp/taskhelp/jms_modules/queues/ConfigureQueues.html
    http://edocs.bea.com/wls/docs103/ConsoleHelp/taskhelp/jms_modules/queues/ConfigureQueueDeliveryFailure.html
    I tried use the proxy service to consume message from the jms topic . and generation an error in the proxy message flow. But the message didn't goes into the error topic.If every thing is configured as per above step, then the after retries, the weblogic server will put the message into JMS topic configured. Your proxy will receive from this topic.
    Let me know if we are not on same page.
    Cheers
    Manoj

  • Pending messages in queue consume cache and result slow processing

    Hi All
              I have one stand alone java application which is consumer of one weblogic JMS queue.
              What my application does, it take big messages in to xml format and convert it in to small chunk of xml using XSLT.
              Here I am struggling with one major problem when I sent 10 messages all together all messages went in to pending queue and as application process only one messages at a time, there for other messages waste the cache and processing become slow.
              If I send same 10 messages one by one after completion of last messages total time to process 10 messages is very less then compare to if I sent all together.
              Is there any web logic setting I can do so only one messages goes in to pending queue.

    Ali,
    How about this:
    142# imsimta qm dir | grep '^ *[0-9]' | wc -l
          14I don't know that it's significantly better, but "qm" generates only a single line of output per message whereas "cache" provides like 10/message.
    Bill

  • Jms Adapter Consume and produce

    Hai guys,
    i don't know anything in soa. i have got a usecase which is to
    1) Read a .csv file
    2) Send it to a bpel (in bpel do nothing to payload). Again i have to send the payload to jms adapter( which i dnt knw how )
    3) From the same jms adapter passing the payload to mediator
    4) Pass the input to another jms( jms2 ). from jms2 pass the payload to another bpel
    5) from bpel to db adapter
    am using
    Oracle jDevloper 11.1.13
    Weblogic server is a 10.3.6
    my problem is how to create the same jms in two ways like consuming and producing
    Thanks in advance
    Edited by: Beckyard on Sep 26, 2012 9:49 PM

    Hi,
    Why do you need 2 JMS queues? Can't you consider following pattern?
    Read .csv --> BPEL --> JMS Q
    JMS Q --> Mediator --> BPEL (only if some payload processing required) --> Db Adapter
    Assuming the above pattern, you'll have to develop 2 processes (in your pattern 3 processes).
    - One that will enqueue the data in JMS in which the JMS Adapter will be placed in the External references and will be invoked with Produce operation.
    - Another process in which Mediator will consume the message using Consume operation from JMS and pass it to BPEL for inserting into database. In this case, JMS Adapter will be placed in Exposed Service swim-lane.
    Let us know how you proceed.
    Regards,
    Neeraj Sehgal

  • JMS Queue working with only one AIA instance.

    Hi,
    We are having a Web-Logic JMS Queue configured for an instance. I have developed a consumer in AIA instance to pull the messages from the Queue.
    And this works fine.
    Now I have an another instance consumer which is pointing to the same Queue, but it fails to get the messages from it.
    I have switched off the consumer in the FIRST instance, but even then consumer from the SECOND instance was not able to pull the messages.
    Later, I tried switching on the consumer of the FIRST instance, and all the messages were pulled in this instance.
    So how can I make it work with two AIA instances and one JMS Queue, provided only one AIA instance consumer is active at a time.
    Thanks in Advance.
    Regards!

    * Likely your best bet is to check your server logs for "Error" and "Warning" messages, and/or, since these questions are specific to AIA's usage of JMS, post your questions to the AIA newsgroup.
    * WL JMS does not impose a limit on the number of consumers on a queue, but it does only allow one named connection with the same "client id" to connect at a time. Its unusual to name connections in queueing applications, but possible - and AIA may be doing this. (If this is the problem there should be "client id in use" style log messages or exceptions.)
    * Another possibility is a misconfiguration of your remote consumer. Make sure the URL is correct, and remember, if an application is running in the same cluster as the remote destination, don't specify a URL.
    * Also, if the remote consumer is running in a different domain, make sure the domains are named differently, and that no two JMS servers in the two domains have the same name (as per the unique naming restrictions documented in the Best Practices section of the JMS configuration guide -- http://download.oracle.com/docs/cd/E14571_01/web.1111/e13738/best_practice.htm#CACJCGHG ).
    Regards,
    Tom

  • Single MDB on a clustered JMS queues(2)

    I have 2 JMS servers in a cluster and each server has a JMS queue, which forms the distributed destination. Now I need a MDB to listen on both these queues. Is it possible?
    Thanks
    -Ankur

    Yes - thats the usual purpose of distributed queues, to allow consumers to consume from the distributed queue (wherever its hosted).
    Though distributed destinations are JMS provider specific so do check your providers documentation on using distributed queues. In some providers, like ActiveMQ, distributed queues look and act just like regular queues so they just work from inside a JMS client or MDB.
    James
    http://logicblaze.com/

Maybe you are looking for

  • App Store not letting me download free games or even let me update apps I already have!

    Ok, so I tried purchasing a item in a game I have (not knowing how much I have in my bank account). App Store denied it so I'm like ok whatever I don't care. Well now whenever I try to download free apps or eve. Update apps I already have the store m

  • Have you had logic board replaced?

    Hi, I am wondering if any folks who have sent their MacBooks in to get the logic board replaced (and received them back) could comment on the effectiveness of the replacement. I have been reading the boards avidly (as my MacBook is off in repair-land

  • "Unable to set directory" on Seagate 500gb Backup Plus USB Hard Drive

    I recently purchased a Macbook Pro as of today, I'm upgrading from windows, and I'm having issues trying to set up my external hard drive to download torrent files. I know with Windows, I can plug in the hard drive cfrom windows computer to another w

  • Could not commint action because item is currently in focus

    Hi, I have 2 scenarios  new and existing in exiting i will show grid and in new edit box. I f user is in edit box and select existing radio button then i am getting bellow error. "could not commit action because item is currently in focus". kindly he

  • System copy pdf

    hi, i am trying to download system copy doc from service market place and sdn for netweaver 2004 ecc5 abap stack from windows IA64 bit to x86 machine. I affraid it is not available 1. Can any body help me to find the url of system copy? 2. one more t