我有这样的场景:
- ESB 中的代理服务调用服务并接收 2.3 到 4.9MB 之间的有效负载。
- 此有效负载有一个人员列表。
- 在这个列表中,我使用迭代器调解器对其进行迭代,并在每个元素内部调用 DBReport 调解器将值存储在 Person 元素中。
当有效负载有 2.3MB 时一切正常并且数据在几分钟内存储在我的数据库中,大约 5000 个元素。
但是对于 4.9MB 的有效负载,它真的很慢,因为您可以很快看到 RAM 最多占用 3.0GB 的 2.7。那时,JMX 监控冻结,3 分钟内只有 10000 个元素的 123 条记录存储在数据库中
一段时间后,处理继续并停止一段时间,您可以看到每个 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}
任何想法?