Redelivery of messages to JMS queue

Hi,
          I am using weblogic 9.2 JMS and MDB for processing messages from queue. Only one instance of Container Managed MDB is running and the important point is that queue sequence should be maintained. I have a problem now. Each message will be picked by MDB and does some db lookups and it is sent over to another system. If there is any communication failure, the message has to be redelivered back to the front of the queue so that sequence is not lost. Even the same message is failing for more than one time, it should still be placed at the front of the queue becoz there is another mechanism that will pause the queue in case of communication exception.
          I tried with throwing Runtime exception but it is crashing the MDB and is getting deployed again which I think is not the right approach.
          I had set the transaction attribute as Required and tried to do setRollBackOnly on that for any exceptions but the message is not in the front of the queue. It is going to the back or somewhere in the queue.
          I also tried to put the message back with higher priority but did not seem to work.
          I have the redelivery delay as 0, I am not sure if I am missing any configuration settings. Pls let me know if there is a way to redeliver the message to the front of the queue for any exceptions in the message procesing by MDB.
          Thanks
          Srini

Srini,
          WebLogic JMS' Unit-of-Order (UOO) feature was very specifically designed to handle strictly ordered message processing. The feature ensures that messages with the same UOO name are processed strictly in order - regardless of the number of concurrent consumers, redelivery delays, rollbacks, etc.
          If the entire queue is to be processed single threaded, you can very simply configure a default UOO for the queue, otherwise there are a variety of other UOO options. A good place to start is the JMS developer guide's UOO chapter.
          And yes, "setRollbackOnly" is the best way to force a rollback of an MDB CMT.
          Tom

Similar Messages

  • Error while sending the messages to JMS Queue

    Hi ,
    I am trying to pick the file from JMS Queue and send the response xml as outbound message to JMS Queue again using XAI Sender
    I Created XAI Sender, Outbound Message Type(DM-RCVRESP) and configured these two with External System.
    I am able to pick the file from JMS Queue but unable to send the message through XAI Sender (Real-time)
    Plz find below the error trace getting.
    [Wed Jun 15 16:12:09 IST 2011] Error while processing sender "UPLOADSTG" : Unable to update response in staging table: Row id not given.
    com.splwg.mpl.sending.SameThreadSendingManager$ProcessException
         at com.splwg.mpl.sending.SameThreadSendingManager.processDestination(SameThreadSendingManager.java:341)
         at com.splwg.mpl.sending.SameThreadSendingManager.sendResponse(SameThreadSendingManager.java:293)
         at com.splwg.mpl.sending.SameThreadSendingManager.doSend(SameThreadSendingManager.java:249)
         at com.splwg.mpl.server.async.ExecSendRequestProcessor.ProcessRequest(ExecSendRequestProcessor.java:61)
         at com.splwg.mpl.server.async.RequestProcessingThreadAdapter.run(RequestProcessingThreadAdapter.java:46)
         at com.splwg.mpl.server.PooledThread.run(PooledThread.java:91)
         at java.lang.Thread.run(Thread.java:662)
    Please guide me in this regard..
    Thanks,
    sukumar

    What have you configured for the response tab for the sender? Are you using the MPL or the MDB?
    Take a look at:
    MPL Best Practices (Doc Id 1308165.1)
    Oracle WebLogic JMS Integration (Doc Id: 1308181.1)

  • Unable to insert messages in JMS QUEUE

    Hi All,
    I am facing an issue while inserting messages in JMS queue.
    The JMS Queue is on another weblogic server and now i created a bpel process which has a jms adapter to insert messages inthe jms queue.I am deploying the Bpel in my server which does not have this particular JMS queue.
    I am unable to insert the messages into the JMS queue present on another weblogic server. where as i am able to insert messages if the queue is present on my server.
    Can you please let me know if its possible to put messages into a queue on remote server from local server.
    Thanks in advance.

    Most probably it seems like an issue of security. Please try to establish cross domain trust between these two Weblogic server domains. For more information refer to http://download.oracle.com/docs/cd/E1284001/wls/docs103/secmanage/domain.html#wp1175687_

  • Recieve/Read  Messages  from JMS Queue through ALSB

    Hi,
    I have configured JMS Queue in weblogic server.
    I have created Messaging Service in ALSB which sends messages in MESSAGE QUEUE.
    Now Is it possinle to receive messages from JMS Queue by creating business service in Aqualogic Service bus???

    Hi dear,
    <br>
    I am sending Message through Serializable Object.
    <br>
    I have JMS Proxy which gets invoked when i send message to JMs Queue. JMS Proxy then calls business service.
    <br>
    <br>
    Business Service has two functions. One is taking String as input and one is taking Serializable Object as Input.
    <br>
    <br>
    public void recieveString(String str)<br>
    public void recieveObject(Trade obj)<br>
    --------------------------------------------------<br>
    Now I have configured Proxy Services' Request and Response
    Message Type as a "TEXT". and I am sending ObjectMessage here so what kind of change I require.
    <BR>
    I also want to configure my proxy so that if JMS queue recieves TextMessage then it should invoke reciveString() function and if Object Message then vice versa.....
    <BR><BR>
    But i am not able to handle object even...
    When I am sending Object Message it takes as a TextMessage.
    I am getting following exception when I am sending Object Message to JMS QUEUE. Request and Response Message types are XML Schema of that object.
    <BR>
    <BR>
    <Nov 30, 2006 4:57:19 PM IST> <Warning> <EJB> <BEA-010065>
    <BR>
    <MessageDrivenBean threw an Exception in onMessage(). The exception was: java.lang.AssertionError.<BR>
    java.lang.AssertionError at com.bea.wli.sb.transports.jms.JmsInboundMDB.onMessage(JmsInboundMDB.j
    ava:112)
    at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:42
    9)
    at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDL
    istener.java:335)
    at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:
    291)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4060)
    Truncated. see log file for complete stacktrace
    >
    Message was edited by:
    alwaysvaghu

  • How to get the XML messages from JMS Queue in BPM

    I have one requirement in my application.we are sending XML messages to the JMS Queue.How to get the XML messages from JMS Queue and how to Extract the details from XMl.
    can you please send me the code to get the XML messages from the JMS Queue.
    Thank you,

    Hi,
    Sure others will have some other ideas, but here's what I typically do to get the XML from a JMS queue. Inside the Global Automatic that pops the messages off the queue you'd have logic similar to this:
    artifactInfoNodes as Any[]
    xmlObject as Fuego.Xml.XMLObject = XMLObject()
    load xmlObject using xmlText = message.textValue
    . . . Once you have this, it's a matter of deciding what you want to do with the message. Most times you'll parse the XML (using XPATH statemens), set argument variables and create a work item instance.
    Hope this helps,
    Dan

  • How to read Java Object message from JMS Queue using JMS Adapter .

    Dear All,
    In my scenario i have to read a java object message from JMS Queue . I tried by using the JMS Adaper ,but i am not getting any Payload . Can any one tell me is there any special settings for JMS Adapter to read the Java Object message .
    I am able to read the Message successfully thru JMS Adapter but in SXMB_MONI it is not showing any payload .
    I also went in Message monitoring but i am getting this type of message in Sender JMS Adapter  in Audit Log.
    JMS Message ID XXXXX Message Type Null unknown.Payload can not be read and will be empty.
    JMS Message ID XXXXX Payload Empty can not read.
    Please Help.
    Lateef

    Hi,
    As far as i know, JMS Object Messages is not supported by XI JMS adapter.
    you need to have the JMS provider to transform the message to bytes messages.
    (Refer to SAP note 856346)

  • I want to use ODI to read XML messages from JMS queue and then process it..

    I want to use oracle ODI (Oracle Data Integrator) to read XML messages from JMS queue and then process it.. i also want to process and validate the data in it....
    Could anyone please tell me the steps to achieve the same. I tried some ways which i got on OTN, but not able to implement it exactly...
    As i m very new to ODI, it will be great if you provide detailed steps..
    Thanks in advance for your help....

    Hi,
    Were you able to do it? We are facing this same issue now and, despite the fact the docs say otherwise, it does not seem to be a trivial task.
    TIA,
    Tedi

  • Posting a message to JMS queue using B2B

    Hi,
    Could anyone suggest a solution for this scenario?
    I have two trading partners say TP1 & TP2. Suppose TP1 is sending an xml message to TP2 using custom ebMS protocol, then at TP2, the message should be posted to a JMS Queue so that some other application can read it and process it.
    The problem which I am facing is..
    1) where to create that JMS Queue(I could not find any options for creating a JMS Queue neither in B2B console nor in enterprise manager console..!!)?
    2) how to register TP2 to send msg to that JMS Queue(How that queue will be vissible to B2B)?
    3) Should the endpoint be given as that JMS Queue while configuring the Delivery Channel for TP2?
    Thanx in advance for your suggestions,
    Regards,
    Satya.

    Hi Narayanan,
    Thank you for your prompt reply. I understand that we need to create an external delivery channel to post the message to a JMS Queue from TP2. Currently I am using default AQ's (b2b.IP_IN_QUEUE & b2b.IP_OUT_QUEUE) at TP2 end to receive the message.
    But, I want to post the message to JMS Queue. For this I need to create an external delivery channel and the corresponding end point should be the name of that JMS Queue. Is my assumption correct?
    I have already gone through the thread that you have mentioned and the pdf as well. But, I am not able to find an option on how & where to create that JMS Queue?
    Could you clarify on this?
    Regards,
    Satya.

  • QueueBrowser not scaning all messages in JMS queue (ie not showing inprogre

    Hi all,
    I am using JMS in jboss-3.2.3, when scaning for pending messages i am using QueueBrowser.
    But QueueBrowser not scaning all messages in JMS queue (ie not showing inprogress message)
    But i need to know all messages including ongoing messages..
    Antone plz help me
    I am using Queuesender and QueueReceiver ..But some Exception or Error causes my JMS server(QueueReceiver listening for onMessage()) hanged up..and not responding to remaining messages...So i need to find pending messags in JMS queue..How can find?
    Now i am using QueueBrowser to get list of pending msgs in queue... But doesn't contains Message which passed for processing (called onMessage())
    .. But i need to find this also..How can?
    Thanks,
    Thilsen

    You're right in thinking that the behaviour you describe looks wrong.
    Take a look at the QueueBrowser interface which can be used to inspect a queue. You get one using QueueSession.createBrowser(Queue). The QueueBrowser allows you to scan a queue without consuming the messages. However note that the state of the queue may change while you're observing it through the QueueBrowser so what you see might not always be a 100% accurate representation of the queue at any given time.
    Other things to check:
    - message selectors - are you setting a message selector on your queue receiver which is resulting in not all of the messages 'matching'.
    - expired messages - are you setting a time-to-live on the messages that you publish.
    Hope this helps,
    David Ingham
    http://www.arjuna.com

  • Weblogic 10.3 Not Removing Expired Messages from JMS Queues

    Dear All,
    We have an application that is running on Weblogic 10.3.
    This application (let us call this application Y) receives messages on a JMS queue. These messages are placed on the queue by another application (let us call this application X). We would like to have these messages expire within a certain amount of time (i.e. 90000 ms) if they are not consumed.
    Now when application X places the messages onto the queue for application Y to consume, the JMS producer sets the time to live to 90000 ms. We can see that expiration time has been set appropriately in the weblogic console. If a message sits on the queue for longer than 90000 ms the state string of the message is changed to "receive expired". What we don't understand is why the expired messages still end up being consumed from the queue.
    We understand that Weblogic is supposed to have an 'Active Message Expiration' thread that will remove expired messages from the queue. The Expiration Scan Interval for the JMS Server is set to 30 (seconds).
    Can anyone tell us why our expired messages don't seem to be deleted from the queues?
    Tim

    Thank you for the response Rene.
    We have set up both the active expiration scan and the message expiration policy. The active expiration scan is set for every 30 seconds. The message expiration policy is set to "discard". However, the expired messages are still being consumed. Is it possible we are doing something wrong? See a portion of our configuration files below.
    We have set up the expiration scan time interval. See a portion of our config.xml below:
    <jms-server>
    <name>brokerJMSServer</name>
    <target>AdminServer</target>
    <persistent-store xsi:nil="true"></persistent-store>
    <store-enabled>true</store-enabled>
    <allows-persistent-downgrade>false</allows-persistent-downgrade>
    <hosting-temporary-destinations>true</hosting-temporary-destinations>
    <temporary-template-resource xsi:nil="true"></temporary-template-resource>
    <temporary-template-name xsi:nil="true"></temporary-template-name>
    <message-buffer-size>-1</message-buffer-size>
    *<expiration-scan-interval>30</expiration-scan-interval>*
    <production-paused-at-startup>false</production-paused-at-startup>
    <insertion-paused-at-startup>false</insertion-paused-at-startup>
    <consumption-paused-at-startup>false</consumption-paused-at-startup>
    </jms-server>
    <jms-system-resource>
    <name>broker-jms</name>
    <target>AdminServer</target>
    <sub-deployment>
    <name>EhrBrokerRequestQueue</name>
    <target>brokerJMSServer</target>
    </sub-deployment>
    <descriptor-file-name>jms/broker-jms.xml</descriptor-file-name>
    </jms-system-resource>
    <admin-server-name>AdminServer</admin-server-name>
    We have set up the message expiration policy in our jms descriptor. See a portion below:
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-jms xmlns="http://www.bea.com/ns/weblogic/weblogic-jms" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-jms http://www.bea.com/ns/weblogic/weblogic-jms/1.0/weblogic-jms.xsd">
    <queue name="EhrBrokerRequestQueue">
    <delivery-params-overrides>
    <redelivery-delay>-1</redelivery-delay>
    </delivery-params-overrides>
    <delivery-failure-params>
    <redelivery-limit>-1</redelivery-limit>
    *<expiration-policy>Discard</expiration-policy>*
    </delivery-failure-params>
    <jndi-name>EhrBrokerRequestQueue</jndi-name>
    </queue>
    </weblogic-jms>
    What could we be doing wrong?
    Kind Regards,
    Tim

  • How to delete the messages from JMS Queue

    Hi,Can anybody help how to delete the messages from the JMS Queue.Thanks in advance.

    You can dequeue the message using a JMS client or delete it using Weblogic Admin Console -
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e13952/taskhelp/jms_modules/queues/ManageQueues.html
    Regards,
    Anuj

  • OC4J 9.0.4: Problem receiving message from JMS queue

    I've created an application which puts XML files in a JMS queue and try to get it out again. The enqueing (sending) is no problem, but when I dequeue from the same queue I receive nothing and if I don't specify a wait time the programs hangs.
    If I create a QueueBrowser I can see there are messages in the queue.
    Can someone tell me what I do wrong?
    Here is the code of my dequeue action:
    public String dequeue(int qName) throws RbsSysException
            final String method = "dequeue(int qName)";
            _log.debug(method);
            QueueConnection queueConnection = null;
            try
                queueConnection = _queueConnectionFactory.createQueueConnection();
                QueueSession queueSession = queueConnection.createQueueSession(false,
                        Session.AUTO_ACKNOWLEDGE);
                QueueReceiver queueRcv = queueSession.createReceiver(getQueue(qName));
                _log.debug("queue = "+ queueRcv.getQueue().getQueueName());
                // Due to bug 3376983 in OC4J We cannot use TextMessage if it exceeds
                // 64 kb. Therefore use ObjectMessage.
                Message msg = queueRcv.receiveNoWait();
                _log.debug("msg = " + msg);
                ObjectMessage objMsg = (ObjectMessage)msg;
                //ObjectMessage objMsg = (ObjectMessage) queueRcv.receiveNoWait();
                _log.debug("objMsg = " + objMsg);
                if (objMsg != null)
                    return (String) objMsg.getObject();
                else
                    return null;
            catch (JMSException je)
                throw new RbsSysException(je);
            finally
                if (queueConnection != null)
                    try
                        queueConnection.close();
                    catch (Exception any)
                        _log.error("Error while closing QueueConnection: ", any);
        }

    Did you implement javax.jms.MessageListener and the method onMessage(Message)?
    If you use onMessage() as wel as receive (or receiveNoWait() or receive(long)), the onMessage() can be called, while the main thread is blocking on a synchronous receive, so make sure you use only one of the two methods: onMessage() or receive.
    Receive() blocks your thread until a message is published. So your program 'hangs' by design. Usually this is used when your program is waiting for a particular message. Otherwise use onMessage().
    ReceiveNoWait() checks if something is in the queue at that very moment, so if nothing is there (yet), the main thread continues.
    Hope this helps,
    Lonneke

  • How to remove messages from JMS Queue?how to configure queue in spring?

    Hi
    I have Confiured a JMS configaration in spring applicationConfiguaration.xml file
    <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="tcp://localhost:61616"/>
    <property name="useAsyncSend" value="true"/>
    </bean>
    <bean id="queue" class="org.apache.activemq.command.ActiveMQQueue">
    <constructor-arg value="foo"/>
    </bean>
    <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
    <property name="config" value="classpath:activemq.xml" />
    <property name="start" value="true" />
    <!-- <property name="messageListener" ref="auditInterface"/> -->
    </bean>
    <bean id="auditInterface"
    class="org.springframework.jms.remoting.JmsInvokerProxyFactoryBean">
    <property name="serviceInterface" value="com.infiniti.gpn.auditing.AuditInterface"/>
    <property name="connectionFactory" ref="connectionFactory"/>
    <property name="queue" ref="queue"/>
    </bean>
    <bean id="listenerContainer" class="org.springframework.jms.listener.SimpleMessageListenerContainer">
    <property name="connectionFactory" ref="connectionFactory"/>
    <property name="destination" ref="queue"/>
    <property name="messageListener" ref="auditMessageListener"/>
    </bean>
    Sender is sedning messages continusly messages that messages r storing in queue , these r acupying more memory in RAM , due to that jboss is restarting for each request, is there any way to clean up messages in Queue ? if it is there then how will configure that queue in apllicationConfiguaration.xml file?
    Thanks in advance
    Nara

    Hi,
    Even i have a similar kind of requirement where in, i want to clear the JMS Queue Message programmatically, on certain condition.
    i am using Spring JMS. The JMS Queue has a listener. In the listener we want to clear the Queue contents based upon the condition.
    If anybody has any idea about this, please reply back.
    Thanks in Advance.
    Manjunath.

  • Making DB updates and sending message to JMS queue enclosed in a single transaction

              using a container managed transactions can we achieve sending a message to the JMS
              queue and updating DB as part of single transaction with the data base driver not
              supporting XA. If yes what all configurations setting I need to do. I tried to achieve
              this using 2PC but I am getting the error that "javax.transaction.xa.XAException:
              JDBC driver does not support XA, hence cannot be a participant in two-phase commit.
              To force this participation, set the enableTwoPhaseCommit property on the corresponding
              JDBCTxDataSourceproperty, to true. Pool = ejbPool".
              

    As far as I know, your only options is to do as the exception you cut-and-pasted below
              states:
              "To force this participation, set the enableTwoPhaseCommit property on the corresponding
              JDBCTxDataSourceproperty, to true. Pool = ejbPool"
              The "enableTwoPhaseCommit" property has definite drawbacks
              see the javadoc and/or documentation for configuring
              a "JDBCTxDataSource".
              This problem is specific to non-XA resources in general, not JMS (which is an XA resource),
              you may wish to get more info by posting to the transaction newsgroup.
              Tom
              Manoj Bansal wrote:
              > using a container managed transactions can we achieve sending a message to the JMS
              > queue and updating DB as part of single transaction with the data base driver not
              > supporting XA. If yes what all configurations setting I need to do. I tried to achieve
              > this using 2PC but I am getting the error that "javax.transaction.xa.XAException:
              > JDBC driver does not support XA, hence cannot be a participant in two-phase commit.
              > To force this participation, set the enableTwoPhaseCommit property on the corresponding
              > JDBCTxDataSourceproperty, to true. Pool = ejbPool".
              

  • ISO-8859-1 Message in JMS queue

    Hello,
    I have a scenario JMS>PI>JMS.
    The ISO-8859-1 data is coming from JMS queue.
    I am using content conversion and i have give text/xml;charset=ISO-8859-1.
    I have tried CCSID as 819, 850 and blank but still error is coming.....
    2009-11-05 06:29:51 Error Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: sun.io.MalformedInputException; nested exception caused by: sun.io.MalformedInputException
    2009-11-05 06:29:51 Error MP: Exception caught with cause com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
    Thanks and Regards
    Hemant

    Hello,
    Now  I m using  AF_Modules/TextCodepageConversionBean    Conversion.charset.
    Now these modeule is ignoring the encoding type
    MP: Processing local module localejbs/AF_Modules/TextCodepageConversionBean
    Conversion: ignoring non text payload
    MP: Processing local module localejbs/AF_Modules/MessageTransformBean
    Transform: using Transform.Class: com.sap.aii.messaging.adapter.Conversion
    Transform: transforming the payload ...
    Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: sun.io.MalformedInputException; nested exception caused by: sun.io.MalformedInputException
    MP: Exception caught with cause com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
    Thanks and Regards
    Hemant

Maybe you are looking for

  • OPM/Oracle Order Management

    What are the pro's and con's of switching from OPM Order Fulfillment to Oracle Order Management? We use Order Fulfillment now and are concern we will lose the profile functionality when and if we upgrade.

  • Itunes store unknown error -50 help needed

    i've recently become unable to access the music, podcasts, and ping sections of the itunes store from my imac (3.06 ghz intel core 2 duo). over the same network, i can access all areas of the itunes store from other devices such as my iphone, ipad, m

  • Displaying of a text file using JAVA in a browser.

    Please can you give me the code for displaying of a text file using a bean and java coding. Please include all files needed. Thanks

  • How to attach a file

    Dear All, I want to send an email but I don,t know how to attach a file. I am using gmail on my ipad2 now I wish to send an email to my friend along with my mail I wish to attach a PDF file. Kindly please help me out because it is not showing the opt

  • How do I unsync FB birthdays from my calendar on my galaxy s5???

    my calendar is synced with my hotmail/outlook account, and all of the Facebook birthdays are showing up as well. I want the Facebook information gone and can not for the life of me find where to do it. I've looked under the settings of the calendar/f