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

Similar Messages

  • Dequeue with OCCI does not remove the message from the queue

    Hey there,
    I have this problem where no matter what dequeue option I try the messages never seem to be removed from the queue... I tried looking around and found only a similar un-answered question...
    Thanks in advance...
    void TryAnydataDequeue(oracle::occi::Connection * conn)
         try
              std::cout << "Dequeue Commence..." << std::endl;
              Consumer cons(conn);
              //Settings de dequeue
              cons.setCorrelationId("SPPC");
              cons.setQueueName("Anydata_queue");
              cons.setConsumerName("SNOOP");
              cons.setDequeueMode(cons.DEQ_REMOVE);
              //cons.setDequeueMode(cons.DEQ_LOCKED);
              std::cout << "Reception du message..." << std::endl;
              Message m2 = cons.receive(Message::ANYDATA);
              AnyData any(conn);
              any = m2.getAnyData();
              if(!any.isNull())
                   oracle::occi::TypeCode type = any.getType();
                   if(type == OCCI_TYPECODE_VARCHAR2)
                        std::string msg = any.getAsString();
                        std::cout << "Message Reçu: ";
                        std::cout << msg << std::endl;
                   else
                        std::cout << "Format du message invalide..." << std::endl;
                   std::cout << "Fin du message... (Press a key)" << std::endl;
              else
                   std::cout << "Message invalide..." << std::endl;
              System::String * theInput = System::Console::ReadLine();
         catch(SQLException ex)
              std::cout << "Exception: " << ex.getErrorCode() << " - " << ex.getMessage() << std::endl;
              System::String * tnput = System::Console::ReadLine();
    }

    The message from the queue will be removed when you do a commit after a successful dequeue call, depending upon your message retention settings.
    After you have done this processing and successfully performed a commit, what is the output of the following query:
    SQL> connect AQADMIN/password
    SQL> select msg_state from aq$<your_queue_table_name_goes_here> ;?
    If it is PROCESSED, check your queue retention settings.
    Additionally, make sure that the init.ora parameter AQ_TM_PROCESSES is set to a NON-ZERO value for this to happen.

  • Removing superseded messages from the queue

    Does JSMQ provide any way for a producer to remove a message from the queue which it queued some time ago but which it no longer wishes to send?
    I am investigating the use of JSMQ in a military battlemap application connecting nodes over low bandwidth/unreliable connections. The reason we want to be able to remove messages is as follows: Say a producer sends a low priority message to the queue regarding a unit's position. Later on the same producer sends an update regarding the same unit to the queue. If the first message is still present in the queue (ie has not been sent yet) then we want the producer to be able to remove it as it is now superseded by the new message and we don't want to waste bandwidth sending the old message first.
    I know we can set an expiry time on messages, but this doesn't really solve our problem. We want the original message to stay in the queue indefinately (until it is read by the consumer) unless it is superseded by a new message in which case we want to remove it.
    Thanks
    Roger

    Hi Roger,
    JMS does not support the removal of messages from a queue
    as you described. I can't think of a way to not deliver the old
    message once it was already sent.
    Alternatives I can think of:
    - Adjust the interval at which the consumer reads the messages
    off the queue and/or the number of messages that are read;
    so that the consumer will see the old and new messages
    and can decide which one to use. This does not address the
    bandwidth issue but allows the consumer to behave smarter.
    - Similar to above, but on the producer side. The producer waits
    for some interval before sending a message, in case an
    updated position of a unit arrives at the producer. This might not
    be good if a consumer needs to know the location of a unit as
    soon as it is available.
    - Use a topic instead of a queue. When using queues, old
    messages (containing old positions) sent to a queue are kept
    until the consumer reads it. With topics, if no consumers are
    around, the message is tossed. However, if you really need old
    messages to lie around (e.g. need to know last position of
    unit), this won't suit your needs.
    Sorry I don't have a straight answer for you, hope this helps
    somewhat.
    -i
    http://wwws.sun.com/software/products/message_queue/index.html

  • 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 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

  • 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

  • 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

  • Pulling message from JMS queue

    Hi,
    I'm looking to pull messages from a JMS queue and have tried setting up a Business Service that doesn't send a request but only expects a response. Doesn't seem to work, I'm unable to pull messages from a queue (I don't want to set up a Proxy Service that listens) - is there a standard way of doing this in ALSB?
    Thanks.

    This is not a supported feature. The best solution is to write a java callout to pull the message from the queue.
    Gregory Haardt
    ALSB Prg. Manager
    [email protected]
    Edited by ghaardt at 09/11/2007 4:00 PM

  • How to read message from JMS queue as a ByteMessage

    Hi,
    i want to browse a xml message from a JMS queue(in Weblogic 8.1) as a ByteMessage instance and then need to put it into byte array .
    Then i want to read each byte by byte from that array.
    Can any one please help me to solve it.
    (i am using java language in the program to browse message from a queue).
    Thanks in advance.
    Regards,
    Deba

    You can refer to the following link for the detailed steps :-
    Link :[http://www.informit.com/articles/article.aspx?p=170722&seqNum=3]

  • Debatching is possible when we are reading messages from JMS queue

    Hi all,
    If i place a message in a queue can i read the message from JMS using BPEL ( JMS Adapter ) or OSB( JMS Transport ) like batcth rather than reading the whole message in to the OSB or BPEL at the same time .
    is this option is available in OSB/BPEL ??
    Thanks
    Phani

    Hi all,
    If i place a message in a queue can i read the message from JMS using BPEL ( JMS Adapter ) or OSB( JMS Transport ) like batcth rather than reading the whole message in to the OSB or BPEL at the same time .
    is this option is available in OSB/BPEL ??
    Thanks
    Phani

  • 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.

  • 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

  • MDB,MDB container or JMS adapter stops processing messages from JMS queue

    Hi guys,
    we have created a component using Enterprise Java Beans, let's say a product catalog, deployed it on a Glassfish v2 instance, and connected it to a legacy system using JMS and Sun MQ v4.1 as messaging system. The catalog component thus starts one MDB that listens on a JMS queue, let's say a queue named catalog_business_events_in, and waits for incoming messages, i.e. in our case update events. The problem is, that in general this approach works well, but sometimes the MDBs/JMS adapter stops for some reason fetching and processing messages from the JMS queue. We don't know why - no exceptions, etc.. Seems to be a Glassfish EJB container, JMS adapter or Sun MQ configuration issue. It seems to be that our component is not the problem.
    The messages are compressed/uncompressed by Sun MQ automatically. We actually have 2 Sun MQ instances in clustered mode running to have some kind of failover - no HA cluster, yet. Sun MQ instances are accessed from Glassfish instances running in different Glassfish clusters - so we have a dedicated Sun MQ cluster not a Sun MQ instance per Glassfish instance. Each Glassfish instance is configured such that it knows both Sun MQ instances to allow automatic failover.
    Has someone an idea, why the MDBs/ MDB container/ JMS adapter - stops processing messages? We are kind of puzzled as it happens more often now and apparently when traffic is (very) low not high!
    Thanks for your help.
    Cheers,
    Martin
    Edited by: east1979 on Jan 13, 2009 8:06 AM

    Hi Manoj,
    I have a very similar if not identical issue,
    Error while running realtime jobs that read from JMS tables via JMS MQ adapter:
    15/11/12 09:10:08  JMS GET OPERATION ERROR : TIMEOUT.UNABLE TO RECEIVE RESPONSE FROM THE INVOKED DATA SERVICES SERVICE.ADAPTER OPERA
    TION TO CONTINUE.
    15/11/12 09:10:15  Communication Error. See real time job log for details.
    Dump available:
    https://sapmats.wdf.sap.corp/download/download.cgi?id=5C0KZAHA3RSXBJW3ABLMUUT2P5UUKWO2TM3EJDM5W2HGDZUDID
    Version of DS:14.0.3.273
    Any comments?
    Thansk and kind Regards,
    Kenneth

  • How to Read Message from JMS Queue using Business Service(ALSB3.0)

    Hi,
     My Project Set up is as follows(using ALSB3.0).
    1>One Proxy Service with transport as HTTP.
    2>The Proxy service is calling another Business Service.
    3>The Business Service has transport layer as JMS.
    So here the business service is posting Request Message into the JMS queue.
    I want at the same time it(The Business Service) should listen to another queue and from there it should read Response Message and forward back to the caller proxy service.
    Can any one help me regarding this...
    Thanks in advance...
    Deba

    Hi ,
    Problem in : Reading / writing messages to the JMS Queue -
    I am stuck with the same problem and I am not able to proceed futher, Can you please help me out in sending an example of how to do right configurations in ALSB and on the server. I read the documentation but still I dont see messages in the queues.
    please help me out. can you post a small sample example
    thanks
    adi

Maybe you are looking for

  • Multiple file download issues

    Hi All, I have designed an APEX application to download multiple files. I have check box in each row of the file name and a download button. When the users checks set of checkboxes and click on the "Download" Button, i am expecting the marked files t

  • Software Update will not install

    I have this re-occurring problem: 1 - iTunes store will not load because it needs new Safari Update 2 - Mac searches automatically for software update and comes up with: • Safari 4.0.3 • Java for Mac OSX 10.5 Update version 1.0 • Security Update 2009

  • Using Unix commands from Java Application

    Hi, I need to write an Java application such that could run Unix commands in a Unix box. For example, my Java app needs to log in the Unix box, change directory (cd), create new folder (mkdir), list the current files in folder (ls), mount a new devic

  • How to make Performa invoice in MM

    hi anybudy tell me how to make performa invoice in MM

  • Failed to transport dictionary changes through JDI

    I'm using a dictionary DC and if I modify it and check in the activities it transport an old version of the dictionary tables. If I deploy the DC manually from the developer it makes it right. Obviously it happens the same when I transport to test. E