Persistent vs. in-memory queues

Hello Experts,
we are developing an SMS-based app. As of now, we imagine it like this:
- Receiver thread reads incoming SMS messages and puts them into a queue
- Processor thread reads messages from the queue and executes logic on them
- Logger thread reads the same messages as Processor and logs them into a database.
We decided to go for in-memory JMS solution because of performance. My questions are
(1) since we are worried that database operations might not put up with message throughputs during peak periods, we create that Logger thread. My understanding here is, if there are to many SMS to get logged into the DB, they will still be processed by the Processor, but logged with some delay. Is that correct? Or should we use persistent JMS? In such case, wouldn't it slow down the app?
(2) having those 2 consumers, should we go for queues or topics? All threads will run on the same machine.
Any help is much appreciated!
Thanks, regards,
Pawel

Hi,
I think that nimo's solution is the one to go for. However, if you cannot afford to loose a SMS message that is added in the processor queue then, you must use persistent messages. Now, if you are using an additional �logger� queue, I guess that you cannot afford a processed message not being logged. Hence, your processor thread should consume a SMS message and send a logging message within the same transaction. Moreover, logging messages must be persistent (even if your SMS messages are not persistent). That should work well apart from the fact that you may want to consume your logging message and update your database within the same transaction. If you don�t do that and have troubles when updating your DB, a message is removed from the logging queue and the DB is not updated leaving your system in an inconsistent state. To perform DB updates and message consumption within the same transaction you must use a JMS provider that offers XA support. A MDB will handle XA transaction for you. However, if you don�t want to use a heavy weight app server you can go for Arjuna MDS that provides XA support as well.
Hope this helps
Arnaud
www.arjuna.com

Similar Messages

  • FTP Adapter internal in-memory queue

    Hi,
    I am trying to implement the use case where i need to pool the new files from the FTP Server. We have only read access to FTP Server. So we can't archeive or delete the files from the FTP Server. And when the new files are placed in the ftp server we need to process only the new files not the old files.
    When i have read the file adapter documentation, the default thread will poll the meta data info of the file and store in internal in-memory queue, processor will pick only new files based on the meta data information available in internal in-memory queue.
    Can any one please let me know where exactly the internal in-memory queue is stored because as part of system maintenance we need to perform purging or backup the soainfra schema. If i perform purging on soa-infra still the file metadata stored in in-memory queue will exists so that old files are not read again?
    Regards,
    Manohar

    The solution is either change the order of deployment or copy the FileAdapter.rar file in $ORACLE_HOME/lib location and restart the server as mentioned here.
    http://soa-bpel-esb.blogspot.com/2011/04/javalangnoclassdeffounderror.html

  • Can dynamic in-memory queues be created programmatically in OC4J?

    Is it possible for an EJB to dynamically create an in-memory queue in OC4J?
    I'm using message-driven bean for concurrency. That is, each client posts messages to a queue so that message-driven beans can process each message concurrently. Each client will receive responses from the MDB's via a response queue. I want each client to dynamically create its own in-memory response-queue. Thus, is it possible to dynamically create an in-memory queue in OC4J? Or is the only option to have a single queue, or pool of queues, and use a message selector system for each client to identify its response messages?
    Thanks,
    Travis

    We're using in-memory queues provided with
    The following FAQ, written in 2004m, indicates that in-memory queues cannot be created dynamically. However, the FAQ is old. I'm wondering OC4J 10.1.3.1 or higher (i.e. 11g) now allows dynamic creation of in-memory queues.
    http://www.oracle.com/technology/tech/java/oc4j/1012/collateral/oc4j-faq-jms-1012.html
    I haven't found a newer FAQ that indicates whether in-memory queues can now be created dynamically using OC4J 10.1.3.1.

  • Is message persistance with 3rd party queues implemented?

    Is message persistance with 3rd party queues implemented for 9.0.2 or 9.0.3 prev?
    I am not able to use Oracle JMS and want to try implementing this.
    Documents on how to implement this would be helpful.
    thanks,
    Isaac

    OC4J 9.0.2 is certified with few JMS providers like MQSeries, SonicMQ, SwiftMQ, etc. Please look at the Services Guide that documents how to use 3rd Party JMS providers.
    regards
    Debu

  • Persisting Messages in Buffered Queues

    Hello Everyone,
    As per the oracle documentation http://docs.oracle.com/cd/B28359_01/server.111/b28321/strms_prop.htm#i1006905
    LCRs that were captured by a capture process are always stored in a buffered queue, but LCRs that were captured by a synchronous capture are always stored in a persistent queue.
    This means that if we use Capture process and server goes down( or is restarted), we will loose those messages in buffered queues as messages are stored in memory.
    1) Is there a way to force capture process to persist the message into persistent queue?
    2) Is there a way to recover the messages from buffered queue when we restart the server?
    Please let me know if you have some ideas / some insights for above two cases.
    Thanks
    Nithin
    Edited by: 906226 on Jan 5, 2012 11:20 AM

    Hello,
    This is really a Streams question.
    When the database goes down the buffered messages are lost. However when the instance restarts the Capture re-mines the redo logs from the required_checkpoint_scn and then re-enqueues the LCRs. The apply also keeps track of where it was at via the apply progress So nothing is lost in the Streams scenario when an instance goes down. This is discussed in the documentation.
    In the AQ world if you are using a buffered queue then the messages would be lost and the application would have to handle that situation.
    Thanks
    Peter

  • JMS - remove persistent messages from memory

    Hi,
    I have a problem with RAM and JMS. I have to store many JMS-messages (overall size
    of more than 2GB). By default they are stored in RAM and in the database.
    How can I configure WL not to store all messages in RAM.

    Do you mean Time to Live Override value that we set in Overrides tab for the jms queue.Yes. Time to Live override can be used for that purpose.
    Do all messages get stored in persistent (file)store while a jms server is up or only the messages with certain status like "Pending" get stored in jms.If yes,do the >pending messages get automatically deleted once the messages are read by the client application.All persistent messages gets stored in the jms store which includes messages in Messages Current ( status - visible ) state.
    Some of the non persistent messages which gets paged out to free physical memory also end up in the store.
    Messages get deleted from the store, but file stores doesn't relieve the disk space to OS after deleting ie file stores never shrink in size automatically. You can even end up with a huge file store even though no messages are pending in any of the queues under it.

  • ALL QUEUE messages are in memory? = OutOfMemoryError

    I have very large queue about which contains messages about 1GB in size and above.
    Can I configure Sun Java System Message Queue to swap incomming messages to disk if system has already NO FREE MEMORY. I use "-Xmx600m -Xms400m" and when I still sending messages to the queue the system will fail and it shows OutOfMemoryError!
    Can somebody help me?

    I'm using version 3.5SP1 to specify the correct system version. I'm persisting messages with default settings, so that they may be persistent. I currently using file based backend storage.
    Do you mean that:
    1. I must use database storage for messages to persist messages?
    in reply to:
    JSMQ does not currently support a disk only backed destination (where messages only occupy disk space).
    2. you say that if number of my stored messages gets over same large number so system fails because it keeps some references to persisted messages?
    I have two questions:
    -- My system after I was send to it about 200000 persistent messages to one queue is restarting very long time. In log file is shown message "[B1136]: Processing stored transactions" and system is starting many many minutes (20 minutes and it still not started). Do you have any advice about it?
    -- May I set property imqConnectionFlowCount to say 1 or 10 messages? Because I sending persistent messages?
    I'm currently trying to configure properties file but system is still behaving the same way. Here is my properties file :
    imq.instanceconfig.version=300
    imq.autocreate.queue=false
    imq.autocreate.destination.maxNumMsgs=0
    imq.autocreate.destination.maxTotalMsgBytes=0
    imq.autocreate.destination.limitBehavior=REMOVE_OLDEST
    imq.autocreate.destination.maxBytesPerMsg=100k
    Here is my log file: Every thread accepting means sending 10000 ObjectMessages, to see the system speed.
    # 1092163502968 Do not modify this line
    [10/VIII/2004:20:45:02 CEST] [B1002]: An existing property file for imqbroker was not found, no stored properties will be loaded
    [10/VIII/2004:20:45:03 CEST]
    ================================================================================
    Sun Java(tm) System Message Queue
    Sun Microsystems, Inc.
    Version: 3.5 SP1 (Build 48-G)
    Compile: Thu 01/29/2004
    Copyright � 2004 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
    This product includes code licensed from RSA Data Security.
    ================================================================================
    Java Runtime: 1.4.2_04 Sun Microsystems Inc. C:\Program Files\Sun\MessageQueue3\jre
    [10/VIII/2004:20:45:03 CEST] License: Sun Java(tm) System Message Queue 3.5 SP1 PE License.
    [10/VIII/2004:20:45:03 CEST] IMQ_HOME=C:\Program Files\Sun\MessageQueue3
    [10/VIII/2004:20:45:03 CEST] IMQ_VARHOME=C:\Program Files\Sun\MessageQueue3\var
    [10/VIII/2004:20:45:03 CEST] Windows XP 5.1 x86 localhost (1 cpu) JanVit�sek
    [10/VIII/2004:20:45:03 CEST] Java Heap Size: max=194432k, current=16256k
    [10/VIII/2004:20:45:03 CEST] Arguments:
    [10/VIII/2004:20:45:03 CEST] [B1004]: Starting the portmapper service using tcp [ 7676, 50, * ] with min threads 1 and max threads of 1
    [10/VIII/2004:20:45:03 CEST] [B1060]: Loading persistent data...
    [10/VIII/2004:20:45:03 CEST] Using built-in file-based persistent store: C:\Program Files\Sun\MessageQueue3\var\instances\imqbroker\
    [10/VIII/2004:20:45:04 CEST] [B1136]: Processing stored transactions
    [10/VIII/2004:20:45:04 CEST] [B1013]: Auto Creation of Queues is Enabled
    [10/VIII/2004:20:45:04 CEST] [B1004]: Starting the jms service using tcp(host = *, port=0, mode=dedicated) with min threads 10 and max threads of 1000
    [10/VIII/2004:20:45:04 CEST] [B1004]: Starting the admin service using tcp(host = *, port=0, mode=dedicated) with min threads 4 and max threads of 10
    [10/VIII/2004:20:45:04 CEST] [B1039]: Broker "imqbroker@localhost:7676" ready.
    [10/VIII/2004:20:46:08 CEST] [B1065]: Accepting: [email protected]:1043->jms:1040. Count=1
    [10/VIII/2004:20:46:08 CEST] [B1132]: Autocreating destination archivace [Queue]
    [10/VIII/2004:20:46:33 CEST] [B1066]: Closing: [email protected]:1043->jms:1040. Count=0
    [10/VIII/2004:20:46:46 CEST] [B1065]: Accepting: [email protected]:1045->jms:1040. Count=1
    [10/VIII/2004:20:47:03 CEST] [B1066]: Closing: [email protected]:1045->jms:1040. Count=0
    [10/VIII/2004:20:47:14 CEST] [B1065]: Accepting: [email protected]:1047->jms:1040. Count=1
    [10/VIII/2004:20:47:30 CEST] [B1066]: Closing: [email protected]:1047->jms:1040. Count=0
    [10/VIII/2004:20:47:52 CEST] [B1065]: Accepting: [email protected]:1049->jms:1040. Count=1
    [10/VIII/2004:20:48:10 CEST] [B1066]: Closing: [email protected]:1049->jms:1040. Count=0
    [10/VIII/2004:20:48:24 CEST] [B1065]: Accepting: [email protected]:1051->jms:1040. Count=1
    [10/VIII/2004:20:48:35 CEST] [B1088]: Entering Memory State [B0021]: GREEN from previous state [B0022]: YELLOW - allocated memory is 116593K, 59% of total memory used
    [10/VIII/2004:20:48:43 CEST] [B1066]: Closing: [email protected]:1051->jms:1040. Count=0
    [10/VIII/2004:20:56:58 CEST] [B1065]: Accepting: [email protected]:1053->jms:1040. Count=1
    [10/VIII/2004:20:57:14 CEST] [B1066]: Closing: [email protected]:1053->jms:1040. Count=0
    [10/VIII/2004:20:57:32 CEST] [B1065]: Accepting: [email protected]:1055->jms:1040. Count=1
    [10/VIII/2004:20:57:48 CEST] [B1066]: Closing: [email protected]:1055->jms:1040. Count=0
    [10/VIII/2004:20:58:08 CEST] [B1065]: Accepting: [email protected]:1057->jms:1040. Count=1
    [10/VIII/2004:20:58:26 CEST] [B1066]: Closing: [email protected]:1057->jms:1040. Count=0
    [10/VIII/2004:20:58:39 CEST] [B1065]: Accepting: [email protected]:1059->jms:1040. Count=1
    [10/VIII/2004:20:59:01 CEST] [B1088]: Entering Memory State [B0021]: GREEN from previous state [B0022]: YELLOW - allocated memory is 129524K, 66% of total memory used
    [10/VIII/2004:20:59:01 CEST] [B1066]: Closing: [email protected]:1059->jms:1040. Count=0
    [10/VIII/2004:20:59:23 CEST] [B1065]: Accepting: [email protected]:1061->jms:1040. Count=1
    [10/VIII/2004:20:59:37 CEST] [B1088]: Entering Memory State [B0021]: GREEN from previous state [B0022]: YELLOW - allocated memory is 135379K, 69% of total memory used
    [10/VIII/2004:20:59:44 CEST] [B1089]: In low memory condition, Broker is attempting to free up resources
    [10/VIII/2004:20:59:44 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0021]: GREEN - allocated memory is 140700K, 72% of total memory used
    [10/VIII/2004:20:59:46 CEST] [B1066]: Closing: [email protected]:1061->jms:1040. Count=0
    [10/VIII/2004:21:05:37 CEST] [B1065]: Accepting: [email protected]:1063->jms:1040. Count=1
    [10/VIII/2004:21:05:39 CEST] WARNING [B2011]: Storing of JMS message from IMQConn[AUTHENTICATED,[email protected]:1063,jms:1040] failed:
    com.sun.messaging.jmq.jmsserver.util.BrokerException: [B4120]: Can not store message 6-127.0.0.1(a6:f4:b:1c:d1:a0)-1063-1092164737671 on destination archivace [Queue] because capacity of 100000 would be exceeded.
    [10/VIII/2004:21:18:36 CEST] [B1065]: Accepting: [email protected]:1065->admin:1041. Count=2
    [10/VIII/2004:21:19:23 CEST] [B1066]: Closing: [email protected]:1063->jms:1040. Count=1
    [10/VIII/2004:21:19:25 CEST] [B1065]: Accepting: [email protected]:1067->jms:1040. Count=2
    [10/VIII/2004:21:22:17 CEST] [B1088]: Entering Memory State [B0021]: GREEN from previous state [B0022]: YELLOW - allocated memory is 95760K, 49% of total memory used
    [10/VIII/2004:21:22:41 CEST] [B1066]: Closing: [email protected]:1067->jms:1040. Count=1
    [10/VIII/2004:21:23:18 CEST] [B1065]: Accepting: [email protected]:1069->jms:1040. Count=2
    [10/VIII/2004:21:23:18 CEST] [B1132]: Autocreating destination mq.metrics.destination_list [Topic]
    [10/VIII/2004:21:23:18 CEST] WARNING [B2007]: Creation of destination mq.metrics.destination_list failed:
    com.sun.messaging.jmq.jmsserver.util.BrokerException: [B4180]: Support for feature [B0048]: Monitoring Destinations is unavailable on destination mq.metrics.destination_list [Topic], please upgrade to the Enterprise Edition to enable this feature
    [10/VIII/2004:21:23:19 CEST] [B1066]: Closing: [email protected]:1069->jms:1040. Count=1
    [10/VIII/2004:21:24:52 CEST] [B1065]: Accepting: [email protected]:1071->jms:1040. Count=2
    [10/VIII/2004:21:25:13 CEST] [B1088]: Entering Memory State [B0021]: GREEN from previous state [B0022]: YELLOW - allocated memory is 128040K, 65% of total memory used
    [10/VIII/2004:21:25:19 CEST] [B1066]: Closing: [email protected]:1071->jms:1040. Count=1
    [10/VIII/2004:21:26:13 CEST] [B1065]: Accepting: [email protected]:1073->jms:1040. Count=2
    [10/VIII/2004:21:26:16 CEST] [B1089]: In low memory condition, Broker is attempting to free up resources
    [10/VIII/2004:21:26:16 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0021]: GREEN - allocated memory is 136518K, 70% of total memory used
    [10/VIII/2004:21:26:33 CEST] [B1088]: Entering Memory State [B0021]: GREEN from previous state [B0022]: YELLOW - allocated memory is 123849K, 63% of total memory used
    [10/VIII/2004:21:26:45 CEST] [B1089]: In low memory condition, Broker is attempting to free up resources
    [10/VIII/2004:21:26:45 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0021]: GREEN - allocated memory is 137529K, 70% of total memory used
    [10/VIII/2004:21:26:49 CEST] [B1066]: Closing: [email protected]:1073->jms:1040. Count=1
    [10/VIII/2004:21:30:21 CEST] [B1065]: Accepting: [email protected]:1075->jms:1040. Count=2
    [10/VIII/2004:21:30:30 CEST] [B1088]: Entering Memory State [B0021]: GREEN from previous state [B0023]: ORANGE - allocated memory is 124839K, 64% of total memory used
    [10/VIII/2004:21:30:34 CEST] [B1088]: Entering Memory State [B0021]: GREEN from previous state [B0022]: YELLOW - allocated memory is 124839K, 64% of total memory used
    [10/VIII/2004:21:30:45 CEST] [B1089]: In low memory condition, Broker is attempting to free up resources
    [10/VIII/2004:21:30:45 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0021]: GREEN - allocated memory is 138535K, 71% of total memory used
    [10/VIII/2004:21:30:52 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0023]: ORANGE - allocated memory is 148807K, 76% of total memory used
    [10/VIII/2004:21:31:04 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0023]: ORANGE - allocated memory is 152230K, 78% of total memory used
    [10/VIII/2004:21:31:17 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0023]: ORANGE - allocated memory is 153114K, 78% of total memory used
    [10/VIII/2004:21:31:25 CEST] [B1066]: Closing: [email protected]:1075->jms:1040. Count=1
    [10/VIII/2004:21:34:06 CEST] [B1065]: Accepting: [email protected]:1077->jms:1040. Count=2
    [10/VIII/2004:21:34:19 CEST] [B1088]: Entering Memory State [B0021]: GREEN from previous state [B0022]: YELLOW - allocated memory is 131047K, 67% of total memory used
    [10/VIII/2004:21:34:26 CEST] [B1089]: In low memory condition, Broker is attempting to free up resources
    [10/VIII/2004:21:34:26 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0021]: GREEN - allocated memory is 137901K, 70% of total memory used
    [10/VIII/2004:21:34:47 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0023]: ORANGE - allocated memory is 151563K, 77% of total memory used
    [10/VIII/2004:21:34:59 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0023]: ORANGE - allocated memory is 154979K, 79% of total memory used
    [10/VIII/2004:21:35:12 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0023]: ORANGE - allocated memory is 153312K, 78% of total memory used
    [10/VIII/2004:21:35:24 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0023]: ORANGE - allocated memory is 149201K, 76% of total memory used
    [10/VIII/2004:21:35:33 CEST] [B1066]: Closing: [email protected]:1077->jms:1040. Count=1
    [10/VIII/2004:21:37:30 CEST] [B1065]: Accepting: [email protected]:1079->jms:1040. Count=2
    [10/VIII/2004:21:38:27 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0023]: ORANGE - allocated memory is 154146K, 79% of total memory used
    [10/VIII/2004:21:39:05 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0023]: ORANGE - allocated memory is 154874K, 79% of total memory used
    [10/VIII/2004:21:39:41 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0023]: ORANGE - allocated memory is 152984K, 78% of total memory used
    [10/VIII/2004:21:39:41 CEST] [B1066]: Closing: [email protected]:1079->jms:1040. Count=1
    [10/VIII/2004:21:41:56 CEST] [B1066]: Closing: [email protected]:1065->admin:1041. Count=0
    [10/VIII/2004:22:57:17 CEST] [B1065]: Accepting: [email protected]:1081->jms:1040. Count=1
    [10/VIII/2004:22:57:47 CEST] [B1088]: Entering Memory State [B0022]: YELLOW from previous state [B0023]: ORANGE - allocated memory is 153223K, 78% of total memory used
    [10/VIII/2004:22:58:01 CEST] [B1089]: In low memory condition, Broker is attempting to free up resources
    [10/VIII/2004:22:58:01 CEST] [B1088]: Entering Memory State [B0023]: ORANGE from previous state [B0022]: YELLOW - allocated memory is 156624K, 80% of total memory used
    [10/VIII/2004:22:58:26 CEST] [B1088]: Entering Memory State [B0023]: ORANGE from previous state [B0024]: RED - allocated memory is 170012K, 87% of total memory used
    [10/VIII/2004:22:58:49 CEST] [B1065]: Accepting: [email protected]:1083->admin:1041. Count=2
    [10/VIII/2004:22:58:57 CEST] [B1066]: Closing: [email protected]:1081->jms:1040. Count=1
    [10/VIII/2004:22:59:36 CEST] [B1125]: Pausing Destination archivace
    [10/VIII/2004:22:59:53 CEST] [B1129]: Resuming Destination archivace
    [10/VIII/2004:23:00:06 CEST] [B1065]: Accepting: [email protected]:1085->jms:1040. Count=2
    [10/VIII/2004:23:00:28 CEST] [B1088]: Entering Memory State [B0023]: ORANGE from previous state [B0024]: RED - allocated memory is 174344K, 89% of total memory used
    [10/VIII/2004:23:01:07 CEST] [B1066]: Closing: [email protected]:1083->admin:1041. Count=1
    [10/VIII/2004:23:01:07 CEST] [B1088]: Entering Memory State [B0023]: ORANGE from previous state [B0024]: RED - allocated memory is 176741K, 90% of total memory used
    [10/VIII/2004:23:01:40 CEST] [B1065]: Accepting: [email protected]:1087->admin:1041. Count=2
    [10/VIII/2004:23:01:42 CEST] [B1066]: Closing: [email protected]:1085->jms:1040. Count=1
    [10/VIII/2004:23:02:11 CEST] [B1066]: Closing: [email protected]:1087->admin:1041. Count=0
    [10/VIII/2004:23:15:14 CEST] [B1047]: Shutting down broker...
    [10/VIII/2004:23:15:14 CEST] [B1007]: Stopping Service admin with protocol tcp(host = *, port=0, mode=dedicated)
    [10/VIII/2004:23:15:14 CEST] [B1007]: Stopping Service jms with protocol tcp(host = *, port=0, mode=dedicated)
    [10/VIII/2004:23:15:14 CEST] [B1077]: Broadcast good-bye to all connections ...
    [10/VIII/2004:23:15:14 CEST] [B1078]: Flushing good-bye messages ...
    [10/VIII/2004:23:15:29 CEST] [B1063]: Done
    [10/VIII/2004:23:15:29 CEST] [B1048]: Shutdown of broker complete.
    [10/VIII/2004:23:15:31 CEST]
    ================================================================================
    Sun Java(tm) System Message Queue
    Sun Microsystems, Inc.
    Version: 3.5 SP1 (Build 48-G)
    Compile: Thu 01/29/2004
    Copyright � 2004 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
    This product includes code licensed from RSA Data Security.
    ================================================================================
    Java Runtime: 1.4.2_04 Sun Microsystems Inc. C:\Program Files\Sun\MessageQueue3\jre
    [10/VIII/2004:23:15:31 CEST] License: Sun Java(tm) System Message Queue 3.5 SP1 PE License.
    [10/VIII/2004:23:15:31 CEST] IMQ_HOME=C:\Program Files\Sun\MessageQueue3
    [10/VIII/2004:23:15:31 CEST] IMQ_VARHOME=C:\Program Files\Sun\MessageQueue3\var
    [10/VIII/2004:23:15:31 CEST] Windows XP 5.1 x86 localhost (1 cpu) JanVit�sek
    [10/VIII/2004:23:15:31 CEST] Java Heap Size: max=194432k, current=16256k
    [10/VIII/2004:23:15:31 CEST] Arguments:
    [10/VIII/2004:23:15:31 CEST] [B1004]: Starting the portmapper service using tcp [ 7676, 50, * ] with min threads 1 and max threads of 1
    [10/VIII/2004:23:15:31 CEST] [B1060]: Loading persistent data...
    [10/VIII/2004:23:15:31 CEST] Using built-in file-based persistent store: C:\Program Files\Sun\MessageQueue3\var\instances\imqbroker\
    [10/VIII/2004:23:15:32 CEST] [B1136]: Processing stored transactions

  • Queue access method for In-memory databases

    Hi,
    I am trying to use the Queue access method for an in-memory database
    with no backing file. Here is the how I've created the environment and
    the database.
    int env_flags_create = DB_CREATE | DB_INIT_LOG | DB_INIT_LOCK |
    DB_INIT_MPOOL |DB_INIT_TXN |
    DB_SYSTEM_MEM | DB_RECOVER | DB_THREAD ;
    ret = env->set_shm_key(env, 17);
    ret = env->open(env, R_"in-mem-env", env_flags, 0644);
    int db_flags = DB_CREATE | DB_THREAD | DB_AUTO_COMMIT;
    DB_MPOOLFILE *mpf = subs_db->get_mpf(subs_db);
    mpf->set_flags(mpf, DB_MPOOL_NOFILE, 1);
    ret = queue_db->set_re_len(queue_db, 512);
    ret = queue_db->open(queue_db, NULL, NULL, "queue", DB_QUEUE,
    db_flags, 0644);
    My application has one reader threads and one writer thread. The
    writer write to the queue with the "DB_APPEND" flag and the reader
    consumes the queue using the "DB_CONSUME_WAIT" flag.
    After inserting a few thousand messages the database fails to insert
    any new records and starts returning the following error.
    "unable to allocate space from the buffer cache"
    From the db_stat -e output (attached below) I can see that none of
    the buffer cache pages are ever being freed up.
    149907 Requested pages found in the cache (99%)
    3 Requested pages not found in the cache
    2004 Pages created in the cache
    0 Pages read into the cache
    0 Pages written from the cache to the backing file
    0 Clean pages forced from the cache
    0 Dirty pages forced from the cache
    0 Dirty pages written by trickle-sync thread
    2004 Current total page count
    0 Current clean page count
    2004 Current dirty page count
    4099 Number of hash buckets used for page location
    153851 Total number of times hash chains searched for a page
    BDB reference manual (http://www.oracle.com/technology/documentation/
    berkeley-db/db/api_c/frame.html) says that the pages associated with a
    queue can only be reclaimed by setting a queue extent by using the
    "set_q_extentsize" method. When I try to use this method on my in-
    memory database I get the following error.
    " Extent size may not be specified for in-memory queue database"
    Does this mean that I can never use the queue access method for in-
    memory database? Because no matter how big of a shared memory pool I
    allocate to the in-memory database it will eventually get used up by
    the queue (if I'm inserting and consuming records) and there is no way
    to free up the pages associated with the deleted records.
    thx
    nina

    As far as I know you can choose any method as long as print setting are set to "send to spool"
    Regards
    Juan

  • Queue manager diagnostic -13

    Hi All ,
    I am trying to enque a message of length 4000 to a queue , am getting the below error
    Q_CAT:1459: ERROR: Enqueue - out of queue space
    based on the description of QCAT:1459 , i created a QUEUE with more pages .
    here is the output of
    qsplQueue space name: TMQUEUE
    IPC key: 3457
    Error queue: ERRQUE
    Initialization: y
    Blocking factor: 32
    Extents: 1
    Extent 0: 100 blocks
    Shared memory usage:
    Additional actions: 0 0 bytes
    Additional owners: 0 0 bytes
    Maximum cursors: 0 0 bytes
    Maximum handles: 0 0 bytes
    Maximum messages: 100 13600 bytes
    Maximum processes: 25 1800 bytes
    Maximum queues: 3 1392 bytes
    Maximum temporary queues: 0 0 bytes
    Maximum transactions: 25 4200 bytes
    Filter memory: 0 bytes
    Non-persistent message memory: 0 bytes
    Overflow memory: 0 bytes
    System reserved memory: 282069 bytes
    Total shared memory usage: 303061 bytes
    still am getting the same error .
    Q_CAT:1459: ERROR: Enqueue - out of queue space
    Failure to enqueue service: TPEDIAGNOSTIC - function failed - check diagnostic value Queue manager diagnostic -13
    One more thing , if I remove the below code from my server , the tpenque is working fine
    /* set flag in control structure indicating a reply queue */
    qctl.flags = TPQREPLYQ;
    /* provide name of reply queue in control structure */
    (void) strcpy(qctl.replyqueue, "REPLYQ");
    #ifdef TPQDELIVERYQOS
    /* Tuxedo 7.1 or later */
    qctl.flags |= TPQDELIVERYQOS;/* specify delivery quality of service */
    /* non-persistent */
    qctl.delivery_qos = TPQQOSNONPERSISTENT;
    #endif
    can anyone pls help me .
    Nadeer.

    when you created your queue space at that time did you specify -n option to create non persistent queue .
    if you did not then that might be the reason.
    The program does not prompt you to specify the size of the area to reserve in shared memory for storing non-persistent messages for all queues in the queue space. When you require non-persistent (memory-based) messages, you must specify the size of the memory area on the qspacecreate command line with the -n option.

  • JMS ignoring settings to send a message as non-persistent

    I'm trying to send a BUFFERED (as opposed to PERSISTENT) message using JMS. I
    would expect the Oracle implementation of JMS to map the JMS
    non-peristent delivery mode in the Oracle BUFFERED delivery mode.
    However, try as I might JMS always sends messages as
    persistent, sample below. Is there any way I can send a BUFFERED AQ message
    using JMS?
    import javax.jms.*;
    import oracle.jms.*;
    import oracle.xdb.*;
    public class jmsbuftest
    public static void main (String args [])
    throws java.sql.SQLException, ClassNotFoundException, JMSException
    try
    String ora_sid = "***";
    String host = "***";
    String schema = "***";
    String password = "***";
    String queueName = "***";
    int port = 1521;
    Enqueue(ora_sid, host, schema, password, queueName, port);
    System.out.println("You should see 3 messages in " + queueName.
    They should be buffered but are persistent instead");
    catch (Exception ex)
    System.out.println("Exception: " + ex);
    public static void Enqueue(String ora_sid, String host,
    String schema, String password, String queueName, int port)
    QueueConnectionFactory qc_fact = null;
    QueueConnection q_conn = null;
    QueueSession q_sess = null;
    java.sql.Connection db_conn = null;
    Queue queue = null;
    AdtMessage adt_msg = null;
    QueueSender q_sender = null;
    oracle.xdb.XMLType xtype = null;
    String data = null;
    try
    qc_fact = AQjmsFactory.getQueueConnectionFactory(host,
    ora_sid, port, "thin");
    q_conn = qc_fact.createQueueConnection(schema, password);
    q_sess = q_conn.createQueueSession(true,
    Session.CLIENT_ACKNOWLEDGE);
    q_conn.start();
    db_conn = ((AQjmsSession)q_sess).getDBConnection();
    queue = ((AQjmsSession)q_sess).getQueue(schema, queueName);
    q_sender = q_sess.createSender(queue);
    adt_msg = ((AQjmsSession)q_sess).createAdtMessage();
    data = "<bolek>olek</bolek>";
    xtype = oracle.xdb.XMLType.createXML(db_conn, data);
    adt_msg.setAdtPayload(xtype);
    //try sending a buffered message, different ways, none of them
    works!
    ((AQjmsQueueSender)q_sender).send(queue, adt_msg,
    DeliveryMode.NON_PERSISTENT, 1,
    AQjmsConstants.EXPIRATION_NEVER);
    q_sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
    ((AQjmsQueueSender)q_sender).send(queue, adt_msg,
    DeliveryMode.NON_PERSISTENT, 1,
    AQjmsConstants.EXPIRATION_NEVER);
    adt_msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
    ((AQjmsQueueSender)q_sender).send(queue, adt_msg,
    DeliveryMode.NON_PERSISTENT, 1,
    AQjmsConstants.EXPIRATION_NEVER);
    q_sess.commit();
    q_sess.close();
    q_conn.close();
    catch (Exception e)
    System.out.println("Exception: " + e);
    }

    I believe you need to use the Oracle specific methods with "buffer"in their name,
    ie. (AQjmsProducer) bufferSend and (AQjmsProducer) bufferPublish. (Page 11-15 of Oracle® Streams Advanced Queuing User's Guide and Reference 10g Release 2 (10.2) )
    So far I've been producing my buffered messages in PL/SQL. I'm receiving them using (AQjmsConsumer) .bufferReceive.
    These require using the (now recommended) generic objects (not specific to Queue or Topic) ConnectionFactory, Connection, Session, MessageProducer.
    I have tried to send buffered messages, and got close, but not got it to work. My core code is:
    ConnectionFactory cfact = AQjmsFactory.getConnectionFactory(args[1], args[0], Integer.parseInt(args[2]), args[3]);
    Connection conn = cfact.createConnection(SCHEMANAME, SCHEMAPWD); // user& password
    // Send buffered probably needs non-transacted session
    Session sess = conn.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
    conn.start();
    Queue queue = ((AQjmsSession)sess).getQueue(SCHEMANAME, QUEUENAME);
    AQjmsProducer q_sender = (AQjmsProducer) sess.createProducer(queue);
    q_sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
    TextMessage txtmsg = sess.createTextMessage();
    txtmsg.setText("Cars Distribution");
    txtmsg.setJMSType("glopt");
    txtmsg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
    q_sender.bufferSend(queue, txtmsg, 1,600);
    Unfortunately I get errors :
    JMS-204: An error occurred in the AQ JNI layer
    JMS-242: Illegal attempt to enqueue message with both immediate visibility and three phase enqueue process.
    It looks like I need to set visibility immediate, but I don't know how to do that in JMS. The AQjmsProducer.bufferSend API documentation says "When the in-memory queue is used, the enqueue operation is required to be in immediate visibility mode"
    The queue create for this example was:
    exec DBMS_AQADM.DROP_QUEUE_TABLE('DBEVENTQ_TABLE', force => true);
    begin DBMS_AQADM.CREATE_QUEUE_TABLE(
    Queue_table => 'DBEVENTQ_TABLE',
    Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE',
    Multiple_consumers => FALSE,
    message_grouping => DBMS_AQADM.NONE,
    Compatible => '10.0'
    end;
    begin DBMS_AQADM.CREATE_QUEUE(
    Queue_name => 'DBEVENTQ',
    Queue_table => 'DBEVENTQ_TABLE',
    Queue_type => DBMS_AQADM.NORMAL_QUEUE,
    Max_retries => 5,
    Retry_delay => 0,
    retention_time => 0 /* dont retain messages */
    end;
    exec DBMS_AQADM.START_QUEUE ('DBEVENTQ');
    If you get past this JMS-242: Illegal attempt to enqueue message with both immediate visibility and three phase enqueue process, please tell me.
    Regards, David

  • Error JMS queue cannot be multi-conumer enabled

    Hi
    I wanted to enqueue using IPmessage type in java but I ended up getting the error
    Exception: oracle.jms.AQjmsException: JMS-130: JMS queue cannot be multi-conumer enabled
    Below is my java code. Anyone has any ideas.
    public static void main (String args [])
    throws java.sql.SQLException, ClassNotFoundException, JMSException
    try
    String ora_sid = "QA620";
    String host = "localhost";
    String schema = "OSA";
    String password = "OSA";
    String queueName = "IP_OUT_QUEUE";
    int port = 1521;
    Enqueue(ora_sid, host, schema, password, queueName, port);
    System.out.println("You should see messages in IP_OUT_QUEUE. Should be buffered but they are persistent instead");
    catch (Exception ex)
    System.out.println("Exception: " + ex);
    public static void Enqueue(String ora_sid, String host,
    String schema, String password, String queueName, int port) throws Exception
    String s5 = generateIdAsString();
    String s6 = "";
    String s7 = "Acme";
    String s8 = "GlobalChips";
    String s9 = "ProcessORDERS";
    String s10 = null;
    String s11 = null;      
    int i = 1;
    String s12 = null;
    if(!isNullString(s12))
    i = Integer.parseInt(s12);
    String s13="D:\\sas.xml";
    if(isNullString(s13))
    throw new Exception("No payload uri");
    String s14 = readFile(s13);
    byte abyte0[] = null;
    String s15 = "";
    if(!isNullString(s15))
    abyte0 = readFileInByte(s15);
    QueueConnectionFactory qc_fact = null;
    QueueConnection q_conn = null;
    QueueSession q_sess = null;
    java.sql.Connection db_conn = null;
    Queue queue = null;
    AdtMessage adt_msg = null;
    QueueSender q_sender = null;
    oracle.xdb.XMLType xtype = null;
    String data = null;
    try
    qc_fact = AQjmsFactory.getQueueConnectionFactory(host,
    ora_sid, port, "thin");
    q_conn = qc_fact.createQueueConnection(schema, password);
    q_sess = q_conn.createQueueSession(true, Session.CLIENT_ACKNOWLEDGE);
    q_conn.start();
    db_conn = ((AQjmsSession)q_sess).getDBConnection();
    queue = ((AQjmsSession)q_sess).getQueue(schema, queueName);
    q_sender = q_sess.createSender(queue);
    adt_msg = ((AQjmsSession)q_sess).createAdtMessage();
    data = "<bolek>olek</bolek>";
    ///xtype = oracle.xdb.XMLType.createXML(db_conn, data);
    //=====================================
    //AdtMessage adtmessage = aqjmssession.createAdtMessage();
    IPMessageOld ipmessageold = new IPMessageOld(s5, s6, s8, s7, s9, s10, s11, i, s14.toCharArray(), abyte0);
    ipmessageold.setPayload(CLOB.empty_lob());
    ipmessageold.setAttachment(BLOB.empty_lob());
    //=====================================
    //adtmessage.setAdtPayload(ipmessageold);
    adt_msg.setAdtPayload(ipmessageold); //xtype
    //try sending a buffered message, different ways, none of them works!
    ((AQjmsQueueSender)q_sender).send(queue, adt_msg,
    DeliveryMode.PERSISTENT, 1,
    AQjmsConstants.EXPIRATION_NEVER);
    q_sender.setDeliveryMode(DeliveryMode.PERSISTENT);
    ((AQjmsQueueSender)q_sender).send(queue, adt_msg,
    DeliveryMode.PERSISTENT, 1,
    AQjmsConstants.EXPIRATION_NEVER);
    adt_msg.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
    ((AQjmsQueueSender)q_sender).send(queue, adt_msg,
    DeliveryMode.PERSISTENT, 1,
    AQjmsConstants.EXPIRATION_NEVER);
    q_sess.commit();
    q_sess.close();
    q_conn.close();
    catch (Exception e)
    System.out.println("Exception: " + e);
    }

    Hi.. i'm trying to put an ADT message created using an ORA Message in the Topic. but i'm getting the conversion error!
    below is the code.
    * Preparing request Message
    try {
                        requestMessage.setOsmOrderid("OSMOrderID12345");
                        requestMessage.setOsmEventVersion("OSMEventVersion1.0");
                        requestMessage.setEventType("SendOrder");
                        CLOB payload = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
                        Writer w= payload.setCharacterStream(1);
                        w.write(xml);
                        w.flush();
                        w.close();
                        //payload.setString(1, xml);
                        requestMessage.setEventPayload(payload);
                   } catch (SQLException se) {
                        System.out.println("SQL Exception Occured :" + se.getMessage());
                        se.printStackTrace();
                   } catch (IOException e) {
                        System.out.println("IO Exception!");
                        e.printStackTrace();
                   AdtMessage request=((AQjmsSession)session).createORAMessage(requestMessage);
                   System.out.println("ORA Message Created.");
                   request.setJMSCorrelationID("ABG");
                   request.setJMSMessageID("324324435435");
                   request.setJMSDeliveryMode(AdtMessage.DEFAULT_DELIVERY_MODE);
    * Creating Sender and sending message.
    TopicConnection topicConn= AQjmsTopicConnectionFactory.createTopicConnection(conn);
                   topicConn.start();
                   TopicSession topicSess= topicConn.createTopicSession(true, TopicSession.CLIENT_ACKNOWLEDGE);
                   Topic requestopic = ((AQjmsSession)topicSess).getTopic("BG_AQ_USER","BG_REQUEST_Q");
                   MessageProducer t_sender= topicSess.createProducer(requestopic);
                   t_sender.send(request, DeliveryMode.PERSISTENT, 1,600000);
    and the error is:
    java.lang.AbstractMethodError: oracle.jms.AQjmsSession.createProducer(Ljavax/jms/Destination;)Ljavax/jms/MessageProducer;
    Instead of a topic connection, I tried using a AQjmsSession and instead of MessageProducer I've tried using AQjmsProducer as well... but the error persists... please help...

  • Worker Role Store Values In Memory

    I am attempting to port a Windows Service to an Azure Cloud Service and a Work Role.
    Everything worked, except the difference is in the Windows Service I could start a class that holds two timers that run forever.
    From what I saw my Cloud Service created the instance of the class, but it looked like after it was finished executing a new Worker Role instance was created.
    Is there anyway to start something and just keep it running?
    My Windows Service I kept a property of Running and RunNumber and both of these values are not storing the value in the next run.
    I can look up the values between runs in SQL if I need to, just seems like there ought to be a way to process and keep alive.
    Thanks if you can shed some life on lifetime of Worker Roles and how to persist items in memory.

    Hi Data Juggler,
    I suggest that you can define the code in your timer to the method  Run() in your Worker Role.
     You can override the Run method to implement a long-running thread for your role instance. If you do override the Run method, your code should block indefinitely.
    Since your worker role is always running, so the value in it will be persisted in memory.
    If the Run method returns, the role is automatically gracefully recycled; in other words, Windows Azure raises the Stopping event and calls the OnStop method so that your shutdown sequences may be executed before the role is taken offline.
    For the lifecycle of the role in Cloud Service ,I suggest that you can refer to the link below:
    http://msdn.microsoft.com/en-us/library/azure/hh180152.aspx
    Best Regards,
    Kevin Shen.

  • Queue loses messages during JMS Module untargeting.

    Hello,
              I have JMS Module with a Queue. I use persistent store for the queue.
              I send some messages to the Queue and i can see them present in monitoring window in Administration console, as well as in WLStore table in db.
              When i untarget JMS module and then target it again. The messages are still present in WLStore table, but they are not present in the Queue anymore.
              Is this proper behaviour?
              thanks in advance,
              regards,
              Jakub Straszewski

    configure a JMS BS with following details Business Service Configuration (default/gfdg)
    General Configuration      
    Service Type      Any XML Service
    Transport Configuration      
    Protocol      jms
    Endpoint URI      
    jms://localhost:7001/weblogic.jms.XAConnectionFactory/gfdgRequest
    JMS Transport Configuration      
    Destination Type      Queue
    Is Response Required      ENABLED
    Response Correlation Pattern      JMSCorrelationID
    Response URI      jms://localhost:7001/weblogic.jms.XAConnectionFactory/gfdgResponse
    Response Timeout      0

  • Did anyone tried Rejection Message Handler via Queue based method?

    Dear All,
    I am presently doing a Rejected Message Handler process and successfully implemented with File based and Web Service based. But I am not getting the clue for Queue based. We can enqueue the rejected message into queue as a JMS message via this method. But the URI format they have given is *"jdbc:oracle:thin:@<host>:<port>:<sid>#<un>/<pw>#queue"*. Format includes jdbc connection string along with queue name. For this I have created JMS module with JDBC Persistent store and created queue in it. But still I am not able to enqueue the message inside the queue. Also, is there anyway to see the queue names inside the DB. Did anyone tried this method? Could you please share the info??

    WL JMS Queue consume>BPEL1 (One way) invoke>Mediator service (one way) route> BPLE2 (one way). Also I have added transaction properties in BPEL1 and 2 + References + Services.
    Now, if there is a fault in BPEL2 the transaction should be rolled back in BPEL1 and the message should be seen in the WL queue itself. But that is not happening in my case. Everything is getting rolled back upto a point just after the >recieve activity in BPEL1 except the message is not getting rolled back to queue.There will be 2 transactions in this scenario : 1) jms queue to soa hydration store 2) soa-hydration to bpel execution.
    This is the behaviour for 1 way or async interfaces , jms adapter thread completes its transaction work after persisitng to dehydration store and another bpel system thread starts work executing the bpel code after retrieving the message off the db in a separate transaction. So the rollback you are seeing is only applicable for 2nd transaction which roll backs to the dehydration store instead of the queue.
    For synchronous interfaces, the same adapter thread will be involved for complete message processing including bpel code execution. So I think if you want to get the jms queue within the same transaction you can try set up the interfaces to be sync, even with dummy responses. This might make jms adapter thread to start a transaction --> read message off queue within the same transaction --> execute bpel code within same transaction --> complete/rollback transaction based on bpel code execution.

  • Saving Message_ Jms Queue

    Hi ,
    how to save the message from the queue if the connection between the queue and the listener has been lost?

    you have to populate the queue with persistent data, then the queue can store the data until it gets dequeued( before timeout obviously, but you can also set the timeout).
    regards,
    Joy

Maybe you are looking for

  • Going to a particular part of a song

    I looked in the help and forums but cannot figure out to "fast forward" thru a song to get to the part where I want to get without waiting thru it. Once I have waited thru it once I can go back to the point where I actually want to get, but if the so

  • Where is the downloads section of the website where I can find DAQmx VI's ?

    I am a student and I am wanting to download the DAQmx VI's.  I can't seem to find a straightforward "here are the downloads" page which I can pick and choose things that I need that NI offers. Thanks anyone.

  • How can I successfully load version 4

    . I cannot install and run the upgrade to version 4. It goes round and round a loop – download the new program set up to a file on downloads – hit run – open a Mozilla wizard and complete 2-3 screens before getting to one which downloads the set up e

  • Migration from PPC G4Powerbook to Leopard Intel Imac

    I am trying to use the Migration Assistant to transfer from G4ppc Tiger to Intel Leopard Imac running 10.5.8. All goes well until the 'Restart your old Mac' screen. When I do this and have the Firewire sign on screen on my ppc G4 powerbook, the 'Cont

  • Exception and Eclipse

    Hello I'm programming with Eclipse an Android application. If I code expressions that could throw an SQLException the Eclipse does not show any suggestion and/or error if I do not catch the exception. For instance:           mDb.execSQL(sql);Any sugg