oracle-aq

How to stop getting messages deleted without acknowledgement in Oracle AQ?

泪湿孤枕 提交于 2020-03-25 12:32:16
问题 I have set up a single customer Oracle AQ. I observe messages from this queue in a Java web application with CLIENT_ACKNOWLEDGE mode. But as soon as I receive the messages in the onMessage method, the messages seems to be getting deleted from the Oracle Queue. My assumption is, the message should not get deleted unless I acknowledge them in the client. How do I stop this? Oracle Queue schema looks like this: BEGIN DBMS_AQADM.CREATE_QUEUE_TABLE( Queue_table => '"TESTUSER"."myqueuetable"',

Grant permission to queues to another schema in oracle

偶尔善良 提交于 2019-12-24 05:54:38
问题 Hi I have a oracle queue in one schema namely aqs sample queue BEGIN DBMS_AQADM.CREATE_QUEUE( Queue_name => 'AQS.MOb_MSG', Queue_table => 'AQS.MOb_QT', Queue_type => 0, Max_retries => 5, Retry_delay => 0, dependency_tracking => FALSE, comment => 'SAMPLE'); END; I have the corresponding Queue table created.It works fine. Now i do want to provide the select grant for the queue using another schema named "mob".How do i provide grant to another schema for a queue?Do i need to provide the select

Writing messages with Spring JmsTemplate using a TransactionManager

自闭症网瘾萝莉.ら 提交于 2019-12-23 03:54:19
问题 Using Spring-JMS it is possible to receive messages within an external transaction context via the DefaultMessageListenerContainer. However the only documented way to write a message is via JmsTemplate.send(…) and I can't see how this can be coerced to use a given TransactionManager . Can anyone point me in the right direction? More info: Ensuring a transaction manager is available ( WebSphereUowTransactionManager ), using JmsTemplate.write against an Oracle AQjmsFactory

How to enqueue on Oracle AQ table on commit with Java and consume with a JMS client

笑着哭i 提交于 2019-12-21 02:48:23
问题 I am writing a Java component for an enterprise level product and want to leverage a particular feature of Oracle 11g databases, Active Queues. The exact scenario i nwant to accomplish is - 1. write a message to the oracle active queue/queue table on commit 2. read that message from the queue with a JMS consumer I followed the demo and tutorial at http://docs.oracle.com/cd/B28359_01/java.111/b31224/streamsaq.htm and in particular, I'd like to focus on the enqueue part of the code - // Create

JDBC connection leak on JDBC pool when using AQ

不想你离开。 提交于 2019-12-11 12:20:41
问题 We are using the Oracle AQ support from spring-data to have both JMS and JDBC over the same datasource, with local transactions instead of XA. The big picture of our setup is basically what is described in the reference manual:on the orcl:aq-jms-connection-factory: use-local-data-source-transaction="true" and native-jdbc-extractor="oracleNativeJdbcExtractor" HibernateTransactionManager (I am trying to use single DataSource(DBCP2 basic datasource) now for AQ and Hibernate).I am using camel JMS

How to enqueue a JMS message into Oracle AQ using Java

我的梦境 提交于 2019-12-09 18:20:52
问题 I have an Oracle AQ with the queue type of SYS.AQ$_JMS_TEXT_MESSAGE. What I'm trying to do is to insert a text into the mentioned queue from a java application. The equivalent SQL query is declare r_enqueue_options DBMS_AQ.ENQUEUE_OPTIONS_T; r_message_properties DBMS_AQ.MESSAGE_PROPERTIES_T; v_message_handle RAW(16); o_payload SYS.AQ$_JMS_TEXT_MESSAGE; begin o_payload := sys.aq$_jms_text_message.construct; o_payload.set_text(xmltype('<user>text</user>').getClobVal()); sys.dbms_aq.enqueue (

Writing messages with Spring JmsTemplate using a TransactionManager

做~自己de王妃 提交于 2019-12-08 03:24:32
Using Spring-JMS it is possible to receive messages within an external transaction context via the DefaultMessageListenerContainer . However the only documented way to write a message is via JmsTemplate.send(…) and I can't see how this can be coerced to use a given TransactionManager . Can anyone point me in the right direction? More info: Ensuring a transaction manager is available ( WebSphereUowTransactionManager ), using JmsTemplate.write against an Oracle AQjmsFactory.getQueueConnectionFactory(dataSource) results in: org.springframework.jms.UncategorizedJmsException: Uncategorized

Oracle Advance Queue - Dequeue not working

社会主义新天地 提交于 2019-12-03 20:15:53
问题 I can't seem to find the solution to my problem, I've been stuck at this for hours. I'm usings Oracle AQs: Dbms_Aqadm.Create_Queue_Table(Queue_Table => 'ITEM_EVENT_QT', Queue_Payload_Type => 'ITEM_EVENT', Multiple_Consumers => TRUE); Dbms_Aqadm.Create_Queue(Queue_Name => 'ITEM_EVENT_QUEUE', Queue_Table => 'ITEM_EVENT_QT', Max_Retries => 5, Retry_Delay => 0, Retention_Time => 432000, -- 5 DAYS Dependency_Tracking => FALSE, COMMENT => 'Item Event Queue'); -- START THE QUEUE Dbms_Aqadm.Start

How to clear a queue in Oracle AQ

青春壹個敷衍的年華 提交于 2019-12-03 15:04:26
问题 I've been testing Oracle AQ for the first time. I have managed to create 2000 rows of test inserts into the queue I created. Now, I'd like to clear those out. As I was teaching myself, I set the expiry time to be a month. I can't wait that long. And I don't think I should just delete them from the queue table. What's the best way to do this? 回答1: You can use the DBMS_aqadm.purge_queue_table procedure. SOLUTION The SQL looks something like this : -- purge queue DECLARE po_t dbms_aqadm.aq$