繁体   English   中英

WSO2 ESB中的Iterator Mediator的问题

[英]Issue with Iterator Mediator in WSO2 ESB

我有这样的情况:

  1. ESB中的代理服务会调用该服务并接收有效负载,介于2.3到4.9MB之间。
  2. 该有效负载具有人员列表。
  3. 通过此列表,我使用迭代器中介器对其进行迭代,并且在每个元素内调用DBReport中介器以将值存储在Person元素内部。

当有效负载有2.3MB时,所有工作正常,并且数据在几分钟内存储在我的DB中,大约有5000个元素。

但是有了4.9MB的有效负载,它的速度确实非常慢,因为您很快就会看到RAM占用了3.0GB最大容量的2.7。 那时,冻结的JMX监视仅在3分钟内将123条记录的10 000个元素记录在DB中

一段时间后,处理继续并停止了一段时间,您可以看到每个DBReport调用之间的延迟:

TID: [0] [ESB] [2013-06-12 16:00:00,480]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:6a11bc08-8e1f-4c37-a031-fe9c84e395da, Direction: response, TEST = 06469 {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2013-06-12 16:00:09,591]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:439fa810-3333-4cbf-bb68-08eb843ca408, Direction: response, TEST = 06471 {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2013-06-12 16:00:15,555]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:24b5dacd-53dd-4d78-8f57-24944cdf2a84, Direction: response, TEST = 06475 {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2013-06-12 16:01:33,420]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:2a8c77a9-ae60-4f84-901d-3b4f76a6b480, Direction: response, TEST = 06477 {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2013-06-12 16:01:41,489]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:1f0632c3-91ee-4fae-b47e-2c88b73aed69, Direction: response, TEST = 06478 {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2013-06-12 16:02:04,190]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/an                     SOAPAction: , MessageID: urn:uuid:02b2b0ae-3d52-48c9-ad09-04e983501e3d, Direction: response, TEST = 06505 {org.apache.synapse.mediators.builtin.
TID: [0] [ESB] [2013-06-12 16:02:05,620]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/an                     SOAPAction: , MessageID: urn:uuid:ae2b72d2-124d-4f34-8033-9036a2b0419a, Direction: response, TEST = 06507 {org.apache.synapse.mediators.builtin.
TID: [0] [ESB] [2013-06-12 16:02:07,411]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/an                     SOAPAction: , MessageID: urn:uuid:ac951f44-c212-4a4d-93c2-9473677acf32, Direction: response, TEST = 06511 {org.apache.synapse.mediators.builtin.
TID: [0] [ESB] [2013-06-12 16:02:14,232]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/an                     SOAPAction: , MessageID: urn:uuid:99e2804e-f70b-449f-9b5f-46f65d81638b, Direction: response, TEST = 06514 {org.apache.synapse.mediators.builtin.
TID: [0] [ESB] [2013-06-12 16:02:15,757]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/an                     SOAPAction: , MessageID: urn:uuid:b0f1dfca-2eda-415c-9c11-3ea70168044e, Direction: response, TEST = 06516 {org.apache.synapse.mediators.builtin.
TID: [0] [ESB] [2013-06-12 16:11:57,247]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/an                     SOAPAction: , MessageID: urn:uuid:9d92ecc9-3b70-440d-8195-c743da44ccd5, Direction: response, TEST = 06517 {org.apache.synapse.mediators.builtin.
TID: [0] [ESB] [2013-06-12 16:12:13,862]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/an                     SOAPAction: , MessageID: urn:uuid:fac67fed-989c-44e2-91cb-c2b3b40460ee, Direction: response, TEST = 06522 {org.apache.synapse.mediators.builtin.
TID: [0] [ESB] [2013-06-12 16:12:28,531]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/an                     SOAPAction: , MessageID: urn:uuid:635d74b9-23ae-435f-909e-c2c6ae171407, Direction: response, TEST = 06523 {org.apache.synapse.mediators.builtin.
TID: [0] [ESB] [2013-06-12 16:12:45,257]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/an                     SOAPAction: , MessageID: urn:uuid:59a006e2-e2ef-4241-9439-10d9db5830c3, Direction: response, TEST = 06524 {org.apache.synapse.mediators.builtin.
TID: [0] [ESB] [2013-06-12 16:19:46,585]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/an                     onymous, WSAction: , SOAPAction: , MessageID: urn:uuid:5d867db0-3e88-4798-9360-0f9a49b9c5ae, Direction: response, TEST = 06525 {org.apache.synap                     se.mediators.builtin.LogMediator}
TID: [0] [ESB] [2013-06-12 16:20:06,866]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:ad48e642-eeb0-49ef-a25f-63f2f10534c0, Direction: response, TEST = 06530 {org.apache.synapse.mediators.builtin.LogMediator}

任何想法?

DBReport介体在WSO2 ESB中同步执行,这意味着执行此DBReport介体的线程会一直停留到数据库操作完成为止。 这意味着性能比异步执行时要低。

因此,为了获得最佳性能,请使用WSO2数据服务服务器并使用DSS执行插入数据库操作。 这样,您可以获得最佳性能。

最好添加配置文件。 这将有助于确定此问题的根本原因。

暂无
暂无

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

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