我正在尝试将数据包从生产者分发到某些(> = 2)消费者,并收集消费者的响应并将其交付给生产者。为此,我使用Apache Camel
库作为负载均衡器,使用Apache MINA2
来处理连接。
但是,当我收到来自制作人的消息时,面对以下异常:
org.apache.mina.filter.codec.ProtocolDecoderException: org.apache.mina.core.buffer.BufferDataException: dataLength: 808793396 (Hexdump: 30 35 35 34 30 31 F3 BE F2 46 45 0F 7F 9B 95 E3 C4 0A C4 31 7F FA 80 19 F0 41 8B 06 53 72 10 A7 82 CB AF 46 EF A4 39 2C 3E E6 27 14 B0 F1 82 1D BA 96 51 7A 06 74 ED 63 02 3D F8 7A C4 F0 9C F2 BF C8 C7 A3 34 11 D0 B3 22 80 B7 80 B5 2B 1F 62 95 E8 03 FE EE 03 AE ED 20 B9 5D 7C 96 68 30 AC CC 6E 7E 8B 79 50 05 E1 22 54 27 21 6E 96 18 63 48 20 C3 C0 F2 4E 54 EF F3 A5 C5 26 8C 61 83 C2 3B 7C 7A 06 97 24 BB 3C 4D 04 3D 61 38 E3 B2 63 AE 56 EB C7 CC 98 AF C2 6F 6D CE 5D F4 DD 55 A4 0B 75 DC F8 EB F0 44 6A 82 32 AB 79 03 FE 85 58 F6 07 9D 14 61 2A 84 03 00 03 C8 9A B1 1E 1B BC 23 47 81 58 6A E7 95 D3 CB 1B 45 35 C2 2C 06 48 78 BB B4 38 A2 07 4F 6A 35 6C D5 B0 B8 97 A9 92 32 63 90 56 22 15 90 FD 68 C1 26 CD D6 12 D0 32 C0 16 B1 46 0E 51 E3 44 77 B0 7E E6 F4 43 4D D6 F8 6B 27 4E 51 65 9A 38 4C 3A CA 3B 2B 82 6A 52 34 C0 04 11 2B 6A 8C BF 2B C8 44 44 DF A4 3B 78 FF 85 48 07 F8 D1 8A 73 C2 C5 62 17 AC D9 97 9C 99 69 0D DA 8C 71 32 61 52 E8 3E AC 5C 3D B7 2A E0 A2 D7 50 53 26 87 BD 26 8C 24 F7 4A DC A4 6C AF 22 A6 5A CE 4F 49 04 A6 7B FE E1 B2 DC C2 9A 52 B5 4A B6 E7 92 E8 ED 4F 61 81 04 7D AB CF EC E0 6F 4B FE 37 35 F5 B1 82 DE 37 F5 38 97 4A 94 0B 5B 1B B9 63 FA FD 2B 1B 12 58 6C 78 4D 1E B1 3E 94 C7 E6 F9 F1 3D FD AD 2A A1 7F D3 E6 C1 A0 F5 65 77 25 E4 9E B4 EA 06 40 CC 3C 75 C7 5A 92 68 D4 47 92 FB E5 6E 33 41 BF D9 CC 06 32 31 26 84 44 1F 78 A7 67 D4 62 80 9B 0B 50 E3 7D 02 EE 94 5B 06 3A 4A 78 32 3B 0B 92 C0 C9 3B 2E 66 33 AA AB 33 07 6D 41 3A 96 04 BA 7B 4A BA D1 32 3B 0B 92 C0 C9 3B 2E 53 09 A5 83 BE B1 5A 89 81 17 B3 33 1E 07 8C 67 CE 47 8C 75 E0 3E AE 84 75 90 BB 91 FF 7C 71 F8 11 F3 E1 A9 EB BE FA 0A 28 3E D3 10 2A 83 45 5C 43 5C E4 32 09 37 B9 7D)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:240)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:947)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:535)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:703)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:659)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:648)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1120)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Camel的EndPoint配置如下:
mina2://tcp://10.20.12.107:2563?minaLogger=true&textline=false&timeout=0
我该如何处理这个问题?
提前致谢。