简体   繁体   English

使用独立Java从Oracle队列中批量出队

[英]Bulk Dequeue from Oracle Queue using Standalone Java

I want to dequeue the messages from Oracle AQ. 我想从Oracle AQ中取出消息。 Oracle is enqueuing data into table called parser. Oracle正在将数据排队到称为解析器的表中。

Since we're asked not to use JMS or any such feature due to deadline, I need a standalone program which will dequeue messages from this queue. 由于最后期限要求我们不要使用JMS或任何此类功能,因此我需要一个独立的程序,该程序将从此队列中取出消息。

Can any one provide me the sample code in Java which will dequeue messages? 谁能提供Java示例代码来使消息出队? Also, we need to dequeu messages in bulk & not one by one. 另外,我们需要成批出队的消息,而不是一个接一个地出队。

I'll appreciate if some one can provide standalone java sample to retrieve bulk dequeued messages. 如果有人可以提供独立的Java示例来检索批量出队消息,我将不胜感激。

Thanks! 谢谢!

I want to dequeue the messages from Oracle AQ. 我想从Oracle AQ中取出消息。 Oracle is enqueuing data into table called parser. Oracle正在将数据排队到称为解析器的表中。

I'm confused about queue and table in the same question. 在同一问题中,我对队列和表感到困惑。

If it's a queue, then write a MessageListener and have it listen to the queue. 如果是队列,请编写一个MessageListener并让它侦听队列。 When messages arrive, it'll receive and process them. 邮件到达时,它将接收并处理它们。

If it's a table, write a task that periodically does a JDBC queue to SELECT all the rows in the table, process, and delete them as a single transaction. 如果是表,则编写一个任务,该任务定期执行JDBC队列以SELECT表中的所有行,进行处理并将其删除为单个事务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM