问题标签 [advanced-queuing]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
2373 浏览

oracle - 模拟消息进入异常队列的场景

如何在 oracle aq 的入队/出队/浏览期间模拟异常,以便消息进入异常队列。我是新手,还没有通过订阅者和消费者。我所做的是----

我现在更熟悉入队、出队、浏览功能。我只是想看看异常队列是如何工作的,并在异常队列上做一些实验(浏览和出队)。从理论上讲,不可能在异常队列中排队。所以我必须生成一些在入队、出队或浏览期间消息进入异常队列的场景。

0 投票
1 回答
439 浏览

sql - 使用 aqapi java 在 enque 期间将异常队列设置为消息属性

在帮助下 [链接]如何在使用 Java 提交时在 Oracle AQ 表上排队并使用 JMS 客户端使用我正在尝试实现这一点 -

这是使用默认消息属性将消息排入队列的函数。

如何将异常队列传递给消息属性?

0 投票
1 回答
899 浏览

oracle - 表复制到其他数据库的高级队列

因此,我正在尝试使用高级队列将表中的数据复制到另一个数据库。我在两个数据库上都创建了一个表:

然后我创建了队列

为复制写了一个程序

并订阅了它

我在TEST-table 中插入/更新数据,而不是执行(更改 ids)此代码

如果它正在工作,这是非常随机的。他似乎总是往 里面写东西TABLE_REPLI_QUEUE_TABLE,但是当它消失时,大约有一半的时间里面什么都没有出现LOG_TABLE,第二个数据库中的数据也没有改变。

0 投票
1 回答
2170 浏览

java - Consuming message in the correct order from an Advanced Queue by Camel and JMS

I have a problem by using Apache Camel in combination with Oracle Advanced Queues and JMS.

It's about an application to distribute messages. Messages are received and enqueued in Oracle Advanced Queues with the help of Camel. Then they are consumed with Camel and forwarded to the target system. For the case that the message delivery fails, there is an retry count defined in the Advanced Queue, so that the message delivery is repeated.

If Camel now dequeue a message and sends it to a target system that is not available, either a HttpOperationFailedException or NoSuchEndpointException is thrown. These are caught and there is a rollback performed.

At this point, the expectation is that the message delivery will be retried as often as defined in the Retry Count and then moved to an exception queue. However, what is happening is that the next message in the queue is send.

Because the contents of the messages are partially dependent on each other, they must be processed sequentially.

I think that there is an misconfiguration in the usage of the JMS Library, but I'm not sure and have found nothing I could influence this behavior.

The used JMS library is Oracle AqApi v 11.2.0.3.

Here is the code for the Camel route:

Here is the JmsComponent configuration:

Thank you in advance for your help!

UPDATE

I think, I've found the reason for the described behavior. There is a delay configured on the Advanced Queue. As long as the delay lasts, the next message from the queue is dequeued. The messages are not dequeued randomly, they are dequeued according to the priorities.

I really think this is something that has to be configured on the consumer. Is there any trick to configure the camel-jms-component to consume the first message from queue as long as it's not commited or moved to the exception queue? I didn't find an option to configure it directly on camel...

0 投票
1 回答
1792 浏览

java - Oracle 高级队列 - 出队后删除消息

我们正在使用 Oracle JMS API 从高级队列中读取消息。我们使用以下代码从队列中读取消息:

问题是,从队列中接收到消息后,它并没有完全从队列表中删除,只是将状态字段从 0 更改为 2。这是 Oracle JMS 客户端的默认行为吗?在使用 consumer.receive() 方法从队列中读取消息后,我们希望从队列表中完全删除记录。什么是合适的api方法来做到这一点?

0 投票
1 回答
484 浏览

java - Oracle 高级队列 - 消耗率的性能问题

我们在 Oracle DB 环境中使用 Oracle Advanced Queue 执行了性能测试。我们使用以下脚本创建了队列和队列表:

我们使用 PL/SQL 客户端以 2380 TPS 发布了 1000000 条消息。我们使用 Oracle JMS API 客户端以 292 TPS 消耗了 1000000 条消息。消费者的速度几乎比发布者慢 10 倍,这个速度不符合我们的要求。

下面是我们用来消费消息的一段 Java 代码:

您对我们如何提高消费者端的性能有什么建议吗?

0 投票
2 回答
6912 浏览

jms - Oracle 高级队列 - RabbitMQ 集成

在我们的一些项目中,消息将从 Oracle Advanced Queue 中使用,并将发布到 RabbitMQ。

如何将 Oracle Advanced Queue 与 RabbitMQ 集成?

0 投票
1 回答
2645 浏览

oracle - PL/SQL:如何处理 DBMS_AQ.DEQUEUE 的超时

我正在从 PL/SQL 程序调用 DBMS_AQ.DEQUEUE。我不想永远等待,但如果队列中没有数据,我会定期超时,然后再尝试再次出队。DEQUEUE 过程的Oracle 文档清楚地说明了如何指定超时(使用 dequeue_options 中的等待字段)。但是,它确实没有提及超时情况下会发生什么。

我本来希望文档指定如何处理超时情况,但要么我忽略了它,要么是文档疏忽,要么它应该很明显,只是我缺乏 PL/SQL 经验让我不知道该怎么做。无论如何,任何关于如何最好地处理/捕获 DEQUEUE 超时的建议都将不胜感激。

0 投票
1 回答
178 浏览

apache-kafka - Kafka:Kafka 是否提供对应用程序级状态转换的支持?

假设我有一个主题,有 6 个分区和 2 个消费者,其中 P1、P2、P3 由 C1 处理,P4、P5、P6 由 C2 处理。假设用户数据 U1 总是到 P1,U2 到 P2,依此类推。

所以,

现在让我们说我们添加了一个消费者 C3,所以重新平衡发生了,现在

所以我的应用程序在 C2 中维护用户 U6 状态,但现在 U6 数据正在流向 C3

现在在这里不知何故,来自 C2 的 U6 状态应该流向 C3。那么这是如何在 Kafka 中实现的,知道它非常常见的问题

或者

如果Kafka不提供任何支持,那么这个问题一般是如何解决的……有没有设计模式来解决它?

0 投票
0 回答
691 浏览

oracle - 如何从 Camel 读取 Oracle OAQ 队列

我正在编写一个从 Oracle oaq(“ANYDATA”)队列中读取 LCR 的 Camel 应用程序。我们没有使用 Weblogic,而是在 Spring Boot 下运行。现在我正在尝试创建一个最小的应用程序来读取 LCR 并将它们转储到日志中。我们得到一个异常(底部显示完整的跟踪),它说:

我想我需要获取会话并填充类型映射。LCR 采用 XML 格式;从网上的 1 个例子中,我看到我可能会做这样的事情:

..但我是骆驼新手(更不用说 ANYDATA 新手了),我不确定这是否可行或如何去做。还想知道我是否使用了错误的驱动程序(我看到指示瘦驱动程序(我正在使用)的东西,其他东西指向 oci。请注意,我们正在连接,因为在我们生成 lcr 之前没有任何反应。

任何有关如何设置最小应用程序以读取 Camel 中的 lcr 并将其转储到日志的指针将不胜感激。

该路线目前看起来像这样:

from("oracleAQ:{{xyz.oracleaq.datasource.srcaq}}") .to("log:out");

..引用的组件是:

TIA。

堆栈跟踪如下: