JMS Consumption

Hi Guys,
I need to understand how to control the consumption of messeges from JMS Queue.
This is what i tried:
1. I created a Queue names TQ.
2. Then created a BPEL process to enqueue messages in TQ.
3. Created a BPEL process to dequeue messages from TQ
At this time when I checked the TQ in weblogic under Monitoring Tab it was showing "consumer current" = 1
4. I stopped the consumption of the TQ.
5. I loaded 5000 messages in TQ using Enqueue BPEL Process.
6. Now the "Current messages" in Weblogic shows 5000 for TQ
7. After this I enabled the consumption of the TQ.
8. Immediately, I jumped to the em console and checked the "Running Instances" check box for the Dequeue service. it displayed 100 running instances.
9. I no where mentioned the number of instances, all above is without any customisation.
10. I refreshed the console several times, the "Running Instances" count fluctaues between 85 and 110, till the complete load is finished.
Please let me know how can this consumption be controlled and when will the "consumer current" = 1 value changes....?
Regards

Hi Arpit,
There is limited support in restricting the consumption. However, you can slow or accelerate the consumption using the following.
To accelerate consumption:_
By default there is 1 poller thread that dequeues the message from JMS. If you increase that thread count, you can accelerate the consumption. Set the adapter.jms.receive.threads Property for this as explained under.
http://docs.oracle.com/cd/E14571_01/core.1111/e10108/adapters.htm#BABCGCEC
To Slow down consumption:_
Introduce the delay between the message consumption as explained under.
Restrict SOA JMS Adapter dequeue frequency
Try with various combinations and let us know how you get along.
Regards
Neeraj Sehgal

Similar Messages

  • JMS Adapter Consumption Error

    Hi All,
    We are getting the below error while trying to consume the JMS Message from the queue. The instance itself is not created.
    The Error Message is as follows:
    +"Non Recoverable System Fault :+
    +Failed to create Translator. Expected "startsWith" or "lookAhead" with "lookFor" at <element name="ODErrorLogger">, but not found. Must specify "startsWith" or "lookAhead" with "lookFor" at <element name="XXXXX">, because this particle is within "choice" model group."+
    When i click on the payload viewing option in the error message i get the boxes and some special symbols.
    Kindly do help us resove the same.
    Regards,
    Balaji R

    Hi,
    You have a XSD for translating native format... The translator is not able to understand your xsd...
    What's your message format, xsd and expected result?
    Cheers,
    Vlad

  • JMS Queue Pause Consumption

    Hi
    Whenever I dont want the proxy to consume a message from a queue , I pause consumption of the queue. I want to always resume the consumption manually.
    The reason whenever the server is restarted , the queue consumption is resumed automatically. How do I control the resumption manually?
    regards

    You can use WLST scripts to set the Operational settings of multiple proxies. Please refer to the below links:
    OSB & WLST: about ProxyServiceQuery
    http://orasoa.blogspot.com/2011/05/disable-and-enable-osb-proxy-services.html
    You can customize the scripts as per your requirement.
    Hope this helps.
    Thanks,
    Patrick

  • JMS Messages getting stuck in queues

    Hi,
    I am facing this peculiar issue with queue messages not getting picked up.
    Application Architecture: There is 1 JMS queue ( which resides in WLDomain1 with in a Unix Box) and there are 2 windows boxes having 2 weblogic domains each with 3 instances of MDB deployed on each of the domains. So total of 12 consumers (2 Box * 2 Domain * 3 Instances of MDB) listens to the JMS queue.
    Issue: After bringing everything up I am able to see 12 consumer count listening to the queue. But when I run the application which writes total of 13 messages in the queue only 7 of them are getting processed and 6 messages are always getting stuck in the queues. Interestingly this 7 messages are mostly getting processed by consumers with in the same windows box. And the selection of windows box is completely random. To confirm whether both the windows boxes are configured fine I tried to test them individually and it works fine individually, the problem happens only if I bring up both the boxes together.
    Another observation is, if I bring down the non working domains, the pending messages start getting processed by the working domains. It gives an impression that the non working domains seem to lock the messages for processing but doesn't actually process it. Only when I bring down the domains it releases this lock.
    Below is the JMS Life cycle events I captured from log files :
    1. Start domain1 in WIN Box1
    ####<Nov 24, 2009 7:54:00 PM CST> <> <> <1259114040304> <783400> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session60.consumer62)> <> <>
    ####<Nov 24, 2009 7:54:00 PM CST> <> <> <1259114040309> <239900> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session63.consumer65)> <> <>
    ####<Nov 24, 2009 7:54:00 PM CST> <> <> <1259114040313> <2100> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session66.consumer68)> <> <>
    2. Start domain2 in WIN Box 1
    ####<Nov 24, 2009 7:54:55 PM CST> <> <> <1259114095403> <38600> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session70.consumer72)> <> <>
    ####<Nov 24, 2009 7:54:55 PM CST> <> <> <1259114095407> <335400> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session73.consumer75)> <> <>
    ####<Nov 24, 2009 7:54:55 PM CST> <> <> <1259114095410> <997700> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session76.consumer78)> <> <>
    3. Start domain1 in WIN Box 2
    ####<Nov 24, 2009 7:56:12 PM CST> <> <> <1259114172061> <316500> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection79.session80.consumer82)> <> <>
    ####<Nov 24, 2009 7:56:12 PM CST> <> <> <1259114172066> <324300> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection79.session83.consumer85)> <> <>
    ####<Nov 24, 2009 7:56:12 PM CST> <> <> <1259114172072> <757000> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection79.session86.consumer88)> <> <>
    4. Start domain2 in WIN Box 2
    ####<Nov 24, 2009 7:56:54 PM CST> <> <> <1259114214000> <142800> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection89.session90.consumer92)> <> <>
    ####<Nov 24, 2009 7:56:54 PM CST> <> <> <1259114214005> <38200> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection89.session93.consumer95)> <> <>
    ####<Nov 24, 2009 7:56:54 PM CST> <> <> <1259114214009> <22400> <> <> <JMSModule!Queue> <ConsumerCreate> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection89.session96.consumer98)> <> <>
    At this point console shows 12 consumers listening the queue which is absolutely fine.
    5. Run application
    --Message Production
    This produces 13 messages ( I have not pasted the complete log)
    -- Message Consumption ( Only 7 messages are consumed)
    ####<Nov 24, 2009 8:00:05 PM CST> <> <> <1259114405953> <576400> <ID:<1047832.1259114392542.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session63.consumer65)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114392542&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:00:10 PM CST> <> <> <1259114410091> <310100> <ID:<1047832.1259114393181.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session66.consumer68)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114393181&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:00:10 PM CST> <> <> <1259114410130> <364600> <ID:<1047832.1259114400626.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session63.consumer65)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400626&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:00:10 PM CST> <> <> <1259114410134> <540700> <ID:<1047832.1259114393125.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session76.consumer78)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114393125&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:00:10 PM CST> <> <> <1259114410137> <632400> <ID:<1047832.1259114393128.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session73.consumer75)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114393128&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:00:12 PM CST> <> <> <1259114412026> <984200> <ID:<1047832.1259114393123.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session60.consumer62)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114393123&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:00:16 PM CST> <> <> <1259114416045> <41800> <ID:<1047832.1259114400005.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session70.consumer72)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400005&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    6. At this point Admin Consol shows 6 messages pending in the queue
    and From consumer numbers it is evident that consumers in WIN Box2 domains have not processed any messages
    Now if I stop server in WIN Box2 Domain1, WIN Box1 picks up the messages instantely
    ####<Nov 24, 2009 8:13:22 PM CST> <> <> <1259115202343> <897600> <> <> <JMSModule!Queue> <ConsumerDestroy> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection79.session80.consumer82)> <> <>
    ####<Nov 24, 2009 8:13:22 PM CST> <> <> <1259115202346> <421900> <> <> <JMSModule!Queue> <ConsumerDestroy> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection79.session83.consumer85)> <> <>
    ####<Nov 24, 2009 8:13:22 PM CST> <> <> <1259115202379> <582300> <> <> <JMSModule!Queue> <ConsumerDestroy> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection79.session86.consumer88)> <> <>
    ####<Nov 24, 2009 8:13:24 PM CST> <> <> <1259115204888> <4600> <ID:<1047832.1259114400029.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session76.consumer78)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400029&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:13:32 PM CST> <> <> <1259115212820> <256700> <ID:<1047832.1259114400258.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session66.consumer68)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400258&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:13:43 PM CST> <> <> <1259115223579> <280600> <ID:<1047832.1259114400032.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session60.consumer62)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400032&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    7. At this poing Admin Consol shows 3 messages pending in the queue
    Now if I stop server in WIN Box2 Domain2, the remaining 3 gets processed
    ####<Nov 24, 2009 8:16:08 PM CST> <> <> <1259115368998> <193400> <> <> <JMSModule!Queue> <ConsumerDestroy> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection89.session90.consumer92)> <> <>
    ####<Nov 24, 2009 8:16:08 PM CST> <> <> <1259115369000> <885500> <> <> <JMSModule!Queue> <ConsumerDestroy> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection89.session93.consumer95)> <> <>
    ####<Nov 24, 2009 8:16:09 PM CST> <> <> <1259115369002> <902500> <> <> <JMSModule!Queue> <ConsumerDestroy> <<anonymous>> <MC:CA(/<IP_BOX2>):OAMI(server.jms.connection89.session96.consumer98)> <> <>
    ####<Nov 24, 2009 8:16:25 PM CST> <> <> <1259115385151> <123700> <ID:<1047832.1259114400324.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session70.consumer72)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400324&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:16:29 PM CST> <> <> <1259115389660> <836600> <ID:<1047832.1259114400535.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection59.session63.consumer65)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400535&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    ####<Nov 24, 2009 8:16:37 PM CST> <> <> <1259115397823> <610200> <ID:<1047832.1259114400432.0>> <> <JMSModule!Queue> <Consumed> <<anonymous>> <MC:CA(/<IP_BOX1>):OAMI(server.jms.connection69.session73.consumer75)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSTimestamp&gt;1259114400432&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties/&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <>
    Kindly throw some light on this issue. Also do let me know if you need any more specific details about this.
    Thanks,
    Abhijeet
    Edited by: user5240164 on Nov 25, 2009 11:35 AM
    Edited by: user5240164 on Nov 28, 2009 1:21 PM

    Hi,
    The problem may be conflicting names in your configuration. To ensure proper operation of WL Security, JMS, JTA, and JDBC, make sure that (A) each domain has a unique name, and (B) no two WebLogic servers have the same name (even if in two different domains).
    To ensure a more even distribution of messages, either simply send more than a token amount messages (eg, a hundred or so, rather than just 12), or configure a custom connection factory on the domain that hosts the queue, reduce MessagesMaximum on the connection factory to 1, and then modify each MDB to refer to the custom connection factory. The MessagesMaximum setting controls the number of messages that can be pre-pushed (pipelined) to a single asynchronous consumer.
    For more information see "Best Practices for JMS Beginners and Advanced Users" in the latest versions of the JMS admin guide, and "JMS Performance & Tuning Check List" in the WebLogic Performance and Tuning guide.
    Tom

  • Messages in JMS Topic Error destination

    Hi,
    I have a JMS Topic with an error destination queue configured. Now, In our scenario , there are two subscribers of topic for the same message. Suppose for a message published to topic, subscriber1 is able to processes message successfully but subscriber2 throws errors when processing the same message.
    1. Once the redelivery limit is reached and subscriber2 continues to throw exception, Will the message get en queued to Error Destination (in spite of the fact that subscriber 1 has processed the same message successfully) ?
    2. For a consumer (e.g MDB) listening to Error destination and consuming error messages, Is it possible to determine which topic subscriber was unable to process the message ?
    Please let me know
    Regards,
    Arif

    Here it depends on the state of the message, if the message is visible then the message would be available for consumption, else it is not. In case the subscriber 2 failed to consume the message and the message is still visible then a retry would be made, else the message would not be retried.
    In case the message is visible then the message would be move to the error queue based on the configured redelivery attempts.
    Additionally, an MDB can find the destination using the getJMSDestination() call. But as per my understanding we will only be able to get the name of the last destination which in this case would be error queue:
    http://docs.oracle.com/javaee/1.4/api/javax/jms/Message.html#getJMSDestination%28%29

  • Issue with JMS adapter

    Hi All,
    I am trying to produce a message into JMS queue from BPEL, for this purpose i have created a connection factory, Queue and connection pool inside console and everything is fine. When i am testing the bpel process, I am able to see that message is written into jms queue with the help of payload inside em. But, I am unable to view the same messages inside the queue that I has created, but the property 'Messages High' of the queue is showing the count of messages it received. I dont see any error in logs, Can I know what I am doing wrong here?
    Thanks,

    Hi,
    If there's something consuming the messages you won't be able to see them...
    Go to the weblogic console and pause your queue for consumption in the control tab, publish a message and you will be able to see it on Monitoring tab...
    Cheers,
    Vlad

  • Jms adapter is very slow

    hi all
    I've got two bpel processes deployed: one is writing message into a queue (created in 10g Oracle DB) using jms adapter, second one is supposed to read message from the queue. It seems to work very slowly, bpel part is executed fast (everything is deployed on fast linux server) but reading from a queue is a bottleneck. It takes rougly 1 second to read a single message from the queue !!!!
    I tried with and without connection pooling and I get the same results.
    I also tried to read from the same queue from a standalone java application: it takes 50-150ms to read one message after obtaining connection.
    My configuration:
    As 10.1.3.1
    adapter wsdl relevant part:
    <binding name="Consume_Message_binding" type="tns:Consume_Message_ptt">
    <pc:inbound_binding />
    <operation name="Consume_Message">
    <jca:operation
    ActivationSpec="oracle.tip.adapter.jms.inbound.JmsConsumeActivationSpec"
    DestinationName="java:comp/resource/ASDBResource/Queues/LSP_INPUT_Q_BRIDGE"
    UseMessageListener="false"
    PayloadType="BytesMessage"
    OpaqueSchema="true" >
    </jca:operation>
    </binding>
    <service name="InboundJMS">
    <port name="Consume_Message_pt" binding="tns:Consume_Message_binding">
    <jca:address location="eis/Jms/JMSDBConnection" UIConnectionName="JMSDBConnection"
    ManagedConnectionFactory="oracle.tip.adapter.jms.JmsManagedConnectionFactory"
    mcf.ConnectionFactoryLocation="java:comp/resource/ASDBResource/QueueConnectionFactories/QCF"
    mcf.IsTopic="false"
    mcf.IsTransacted="true"
    mcf.FactoryProperties=""
    UIJmsProvider="OJMS" />
    </port>
    </service>
    ASDBResource is configured in application.xml to point to a proper machine.
    When I set useMessageListener to "true" I get even worse performance.
    I found following text in adapters faq, maybe there is an option to change pooling interval ?
    <The JMS API supports both synchronous or asynchronous communication for <message consumption. In the
    <synchronous case, the consumer explicitly calls the receive() method on the <topic or queue. In the
    <asynchronous case, the JMS client registers a MessageListener for the topic or <queue and the message is
    <delivered by calling the listener’s onMessage() method. By default, the consumer <uses a polling method. The
    <Adapter design-time is used for overriding the default behavior and can be used to <configure a message listener
    <for receiving JMS messages in an asynchronous fashion.
    cheers
    Przemek

    If speed is of essence, have you considered using the AQ adapter instead ? That should be faster when compared to the jms route, assuming you are going against Oracle AQs.

  • Persistent messages are not deleted from JMS store

              Hi,
              I'm experiencing some unexperienced JMS store behaviour with WLS 6.1 sp 4. I have
              a servlet that posts a message to persistent JMS queue, which will be eventually
              consumed by an MDB. Even though consumption is successful, the message is not
              deleted from JMS store.
              The message will be redelivered after server restart and is still not deleted
              from JMS store. I verified this using file store and JDBC store. The messages
              actually stay in the JMSSTORE table till doom's day.
              I couldn't reproduce the case with WLS 6.1 sp 3. Exactly the application code
              was used in all cases.
              Subsequently I ran the same case with various ServerDebug DebugJMSXXX-flags set,
              and discovered that WLS 6.1 sp3 logs 'asyncDeleteL' and 'ZZZDelete' for the consumed
              message. WLS 6.1 sp4 didn't log this information.
              I'm running WLS 6.1 on WinNT and Win2000.
              Comments?
              b r
              Juha Räsänen
              

    I've am having exactly this problem with wl 5.1....
              I first saw it with 5.1 sp8....
              In the release notes for 5.1 sp10, the following CR was fixed, which seemed
              like it might have been my problem:
              CR 45915
              Fixed a JMS problem with messages begin left in the queue after received messages had been acknowledged. When a high volume of
              messages was sent to a queue and a consumer retrieved those messages and sent them to another queue, the messages were not being
              removed from the first queue even though they were acknowledged.
              We upgraded to 5.1 sp12, and it appeared that the incidence of that problem was reduced.
              However it still occurs once or twice a week, with 5.1 sp12....
              My situation is a little bit different, in that my consumer retieves a message, and sends another
              message to the SAME queue instead of another queue as described in the CR above...
              It does happen under heavy load, etc....
              Don't know if this has been reported and identified for wl 5.1 sp12 or not...
              It is of course a really difficult to deal with bug....
              Jason
              "Juha Räsänen" <[email protected]> wrote in message news:[email protected]...
              >
              > Hi,
              > I'm experiencing some unexperienced JMS store behaviour with WLS 6.1 sp 4. I have
              > a servlet that posts a message to persistent JMS queue, which will be eventually
              > consumed by an MDB. Even though consumption is successful, the message is not
              > deleted from JMS store.
              >
              > The message will be redelivered after server restart and is still not deleted
              > from JMS store. I verified this using file store and JDBC store. The messages
              > actually stay in the JMSSTORE table till doom's day.
              >
              > I couldn't reproduce the case with WLS 6.1 sp 3. Exactly the application code
              > was used in all cases.
              >
              > Subsequently I ran the same case with various ServerDebug DebugJMSXXX-flags set,
              > and discovered that WLS 6.1 sp3 logs 'asyncDeleteL' and 'ZZZDelete' for the consumed
              > message. WLS 6.1 sp4 didn't log this information.
              >
              > I'm running WLS 6.1 on WinNT and Win2000.
              >
              > Comments?
              >
              > b r
              > Juha Räsänen
              

  • 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

  • Load balancing MQ 7.0 Foreign JMS Server and Weblogic 10 MDBs?

    We have the following configuration and we are trying to troubleshoot what appears to be a load balancing issue.
    We have 3 Solaris servers. Each Solaris server has two Weblogic managed servers running on it. There are a total of 6 managed servers in the Weblogic cluster.
    MQ Series 7.0 is also installed on each Solaris server. The MQ queue managers are in a MQ cluster. Each queue manager has the same queues defined.
    We have a foreign JMS Server configured on Weblogic that has destinations and a connection factory defined. There aren't many configuration options available for the connection factory. The destinations are bound to the queues defined on MQ using the MQ bindings file.
    The MQ bindings file was generated using the TRANSPORT(BIND) mechanism. Each bindings file points to the queue manager running on that machine. So the 2 managed servers running on one machine are accepting messages from the queue manager on that machine.
    The MDB's listenning for messages on the MQ queues are configured as follows in the weblogic-ejb-jar.xml:
         <max-beans-in-free-pool>16</max-beans-in-free-pool>
    We also created a custom work manager with min threads constraint=5 and max threads constraint=16. The dispatch-policy of all the MDBs is set to the custom work manager.
    The open input count on each MQ queue managers shows up as 32 which is expected.
    The default load algorithm on the cluster is round-robin.
    When we run a load test (injecting 40 messages per second on one MQ queue), we notice that one managed server ends up being significantly loaded than the other. Each MQ queue manager in the MQ cluster receives approximately the same number of messages in the load test. But it seems like one managed server is preferred over the other in Weblogic.
    What can be done to equally balance the load among the two managed servers on each Solaris server?
    Thanks for the help.

    Load balancing generally applies at determing how many consumer threads has to be created on each of the clustered queue instance. In that sense you have achieved perfect load balancing as your queue instances has the same no of consumer threads.
    Once you have set 'x' consumer threads on a queue, it is upto messaging provider to decide which thread to deliver a particular message and you will hardly have any control over this. Since your 32 threads are listening on the same queue, MQ can select any thread for delivering the message and the behaviour could be non deterministic.
    One option to change your design is to have a dispacther mdb which picks the messages off the MQ and then routes to a weblogic distributed destination and you can have your core mdb which does all processing listen to this distributed destination. You can enable load balancing when the disaptcher mdb routes the message to the distributed destination. Since dispatcher MDB is nothing more than a router, the unbalanced consumption off the MQ shouldn't seriously affect the server.

  • A single TX for message consumption and CRUD operation

    consider the following scenario?
    message producer inserts message into a queue (MQ queue, or a TIBCO JMS Server), MDB running on WebSphere application server consumes the message, parses it and calls a stateless session EJB , which in turn inserts it into the DB.
    Can the message consumption (by MDB) and DB insert (by session bean) be part of the same transaction? Meaning, if the DB insert fails, the rollback would result in the message remaining in the queue, so another MDB instance would pick it up.

    Yes, in fact that is the spec-required behavior for JMS MDBs with container-managed
    transactions and tx attribute REQUIRED. Of course, the stateless session bean would also
    have to have container-managed transactions and a tx attribute that will result in the MDB's
    transaction being used (e.g. REQUIRED, SUPPORTS, etc.)
    In that case, the message delivery itself is considered to be a unit of work within the global
    transaction. If the transaction does not commit, the message will be redelivered.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Consume JMS Unit-Of-Work message through OSB proxy service

    Hi,
    Anyone know how to consume a JMS Unit-Of-Work (UOW) message using an OSB Proxy Service of JMS type?
    I can submit a unit-of-work JMS message (which consists of multiple constituent messages) using an OSB proxy & business service combination and setting the UOW transport headers appropriately. I can also separately produce and consume Java objects via a JMS queue where the consumption is done via OSB proxy (of java request message type), but these aren't UOW messages.
    Apparently as soon as it is a UOW message then the message consumed is an ObjectMessage ArrayList and one has to use the "Java" request message type for the JMS consumer proxy, but I'm unsure of how to create the concurrent client jar to use it in the same proxy service's JMS transport configuration in order to output the ObjectMessage ArrayList (UOW message). 
    Ideally I'd like to consume a single UOW XML message via an OSB JMS proxy service.
    Any pointers would be appreciated.
    R

    Finally got this working!!
    For posterity: Needed to insert Java Object JMS messages on the OSB JMS producer (Business Service) side with correct UOW jms transport header set in route node. Then consume the Unit-Of-Work message on the other side via jms proxy service with "java" request message type, with appropriate jar containing the Object class as the "Client jar" in the JMS Transport configuration. In the same JMS consumer proxy I had to do a java callout, passing the contents of $body, using java.util.ArrayList and javax.jms.ObjectMessage, as input into a method (.. decodeJavaMessage(ArrayList<ObjectMessage> ...)). In this java callout class you can get to each individual ObjectMessage via typecasting the get() method on the Arraylist to (ObjectMessage) and then just typecast the getObject() on this Objectmessage into your original Java Class (same as what you inserted onto queue originally).
    Hope this saves someone some time in future!

  • Jms queue in "write only" mode...

    Hi.
    I have a jms queue and I want set it to "write only mode" for some time. It means that I want to put messages to this queue but I want this messages to not be able to receive by any consumer until I remove "write only" flag. Is it possible?
    Thanks in advance!

    do you have control of the consumers? at my previous job, we wanted to stop queue consumption at certain points in time. we were using jboss, which enabled us to control the mdb consumer pool via jmx. dunno if other app servers have similar functionality. regardless, you aren't going to find a solution to this within vanilla jms, it will be an app-server specific solution. (possibly you could put the mdb's in their own ear file, and deploy/undeploy this ear as necessary?)

  • Interpretation of the use of threads with Sessions in the JMS Specification

    Hello,
    I’ve been interacting with two JMS Providers which do a different interpretation of the JMS Specification with the use of different threads for accessing to a session and session’s related objects.
    The question is:
    When a client is consuming messages asynchronously, is it possible to access session’s related objects from a thread different to the one dedicated to the asynchronous consumption, on (thread of control)?
    -     Never?
    -     Yes, but the client should provide explicit synchronization.?
    Our execution scenario is:
    1.- Messages are consumed asynchronously from a dedicated thread.
    2.- From other thread, messages consumed are acknowledged.
    In the JMS specification there is, at least, two parts where this issue is treated:
    1.- The first one (4.4.1 - page 60):
    +“There are no restrictions on the number of threads that can use a Session object or those it creates. The restriction is that the resources of a Session should not be used concurrently by multiple threads. It is up to the user to insure that this concurrency restriction is met. The simplest way to do this is to use one thread. In the case of asynchronous delivery, use one thread for setup in stopped mode and then start asynchronous delivery. In more complex cases the user must provide explicit synchronization.”+
    This extract, makes me think that it is possible the access from different threads, but If I do that, I should provide explicit synchronization.
    2.- The second one (4.4.6 – page 62,63)
    +"Once a connection has been started, any session with a registered message listener(s) is dedicated to the thread of control that delivers messages to it. It is erroneous for client code to use this session or any of its constituent objects from another thread of control. The only exception to this is the use of the session or connection close method"?+
    This extract, could be interpreted as that the concurrent access is never allowed in the described situation.

    I think the key words are in 4.4.6 (and also the javadoc for Session): "Once a connection has been started, any session with a registered message listener(s) is dedicated to the thread of control that delivers messages to it".
    My interpretation of this is that you when you register a message listener and call connection.start(), the thread which delivers messages to the listener should be thought of as "using the resources of the session" (as mentioned in 4.4.1) continuously until the connection is stopped (or until the session or connection is closed). it doesn't matter whether the session is executing onMessage() or not.
    Given this, both 4.4.1 and 4.4.6 say the same thing: that once you have registered and started a message listener, the only thing you can do to the session from another thread is to close it.
    I agree the spec could be clearer. In particular the words "In more complex cases the user must provide explicit synchronization" in 4.4.6 should be clarified to state what this actually means rather than give a hint.
    Please note that work has just started on updating the JMS specification, so now is a great time to report areas of the JMS spec which would benefit from clarification. If you'd like this to be considered for clarification, please report it in the official JSR 343 issue tracker at http://jms-spec.java.net
    Nigel

  • JMS memory issue

    Hello,
    I have seen some weird memory behavior regarding Weblogic JMS server.
    Let me describe the 2 scenarii:
    1) Producer on a queue which sends messages without any consumer on this destination.
    Then I monitor the memory and stop the producer when the memoy has reached 850 Mb.
    I wait for few minutes in order to be sure the VM garbage collector does its stuff: still around 850 Mb.
    Then I shutdown the Weblogic server and restart it. Again I monitor the memory and I have seen after
    having wait for a few minutes that the memory consumption was this time around 450 Mb.
    So the question is why the memory delta was so big: around 400 Mb ?
    2) Producer on a queue which sends messages without any consumer on this destination.
    Then I monitor the memory and stop the producer when the memoy has reached around 500 Mb.
    I wait for few minutes in order to be sure the VM garbage collector does its stuff and start a consumer
    which consumes all the messages.
    I monitor the memory and see that, when all the messages have been consumed, the memory has
    not decreased :-(
    Then I relaunch my producer without any consumer and the memory consumption still continue to grow :-(
    Is these behaviors normal ? Could you please give me some explanations regarding thes 2 behaviors ?
    Best Regards.

    I monitor the memory and see that, when all the messages have been consumed, the memory has
    not decreased Did you wait for GC to occur after messsages have been consumed.
    Weblogic stores messages in memory for faster access. You can control how much of the heap can be used for this purpose by confgiuring Message Buffer size for the jms server.
    Message Buffer Size
    The amount of memory (in bytes) that this JMS server can use to store message bodies before it writes them to disk. When the JMS server writes the message bodies to disk, it clears them from memory.
    A value of -1 (the default) specifies that the server will automatically determine a size based on the maximum heap size of the JVM. This default will be set to either one-third the maximum heap size, or 512 megabytes, whichever is larger.
    The larger the buffer, the more memory JMS will consume when many messages are waiting on queues or topics. Once the buffer is surpassed, JMS may write message bodies to the directory specified by PagingDirectory in an effort to reduce memory usage below this buffer.
    Surpassing the buffer size does not stop the JMS server from accepting new messages. It is still possible to run out of memory if messages are arriving faster than they can be written to disk. Users with high messaging loads who wish to support the highest possible availability should consider setting a quota or setting a threshold and enabling flow control.
    Paging is always supported.
    MBean Attribute:
    JMSServerMBean.MessageBufferSize
    Minimum value: -1
    Maximum value: 9223372036854775807

Maybe you are looking for

  • Corrupted images in windows browsers

    Can anyone help? I have made a site which has a number of jpeg images created in photoshop, using "save for web & devices" etc. They are set to 120 dpi and reduced to fit. The site looks fine in browserlab when viewed with chrome, safari and the late

  • In design to pdf/x-1a:2001 embedded fonts

    Hello Everyone, I was asked by a printed to export my cs2 indesign file as a pdf/x-1a:2001 file with embedded fonts. The document just came back stating that the font on page 27 is not embedded. The same font is used through out the document. When I

  • Using conference call dial in numbers with iPhone

    On my old Blackberry I used to be able to call a conference call dial in number and it was set up so that it would dial both the 1-800 number and then the participant code for the conference call. Anyone know if it's possible to do the same with the

  • TDS on Provision

    I have to make provision on the Balance Sheet date and on this provision I have to deduct the TDS. Now at the time of payment we deduct the TDS also, then TDS would be deducted double. Then how this transaction would be happened in SAP.

  • Overlay creator and movies

    I'm building a page that contains a menu and stacked items, as you cant stack stack these stacks i'v made in to a multy page article with buttons to go to the other pages, giving the look of one page with buttons. now i want to ad a movie to these pa