[英]WSO2 ESB Creates Too Many Temporary Advisory Topics in ActiveMQ
Using WSO2 ESB 4.9.0 and ActiveMQ 5.15.9. 使用WSO2 ESB 4.9.0和ActiveMQ 5.15.9。
This all began when I upgraded the ESB from 4.8.0 to 4.9.0. 这一切都始于我将ESB从4.8.0升级到4.9.0。 The ESB acts as both a producer and consumer, and uses non-blocking tcp or SSL connections.
ESB既充当生产者又充当消费者,并使用非阻塞tcp或SSL连接。
Every time the ESB establishes connection to produce or consume a message, a temporary topic, "ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic" is created, and it just sits there with no messages passing through it, ie 0 enqueued and 0 dequeued. 每次ESB建立连接以生成或使用消息时,都会创建一个临时主题“ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic”,它只是在那里没有消息通过它,即0排队和0出队。 Here is what it looks like under the connection information.
这是连接信息下的样子。
Then, the connection to which this temporary topic is attached remains as a RUNNABLE thread in the JVM and never exits. 然后,附加此临时主题的连接仍然作为JVM中的RUNNABLE线程,永远不会退出。 Neither the ESB nor the broker attempts to close this connection.
ESB和代理都没有尝试关闭此连接。 The threads themselves seem to be spinning on a socket read:
线程本身似乎在套接字上旋转:
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at com.rsa.sslj.x.ap.c(Unknown Source)
at com.rsa.sslj.x.ap.a(Unknown Source)
at com.rsa.sslj.x.ap.b(Unknown Source)
at com.rsa.sslj.x.ap.b(Unknown Source)
at com.rsa.sslj.x.al.read(Unknown Source)
at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
at org.apache.activemq.transport.tcp.TcpTransport$2.fill(TcpTransport.java:634)
at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:59)
at org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:619)
at java.io.DataInputStream.readInt(DataInputStream.java:387)
at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:268)
at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:240)
at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:232)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215)
at java.lang.Thread.run(Thread.java:748)
Locked ownable synchronizers:
- None
This causes the ESB to eventually run out of threads as it services more and more messages. 这会导致ESB最终耗尽线程,因为它为越来越多的消息提供服务。 Messages are being passed asynchronously, so they shouldn't be waiting on acknowledgements.
消息以异步方式传递,因此它们不应等待确认。
Things I've tried: 我试过的事情:
How can I prevent the ESB/broker from creating these topics while still allowing messages to be produced and consumed on the actual queues, or at least have the ESB/broker close the connection in some way? 如何阻止ESB /代理创建这些主题,同时仍然允许在实际队列中生成和使用消息,或者至少让ESB /代理以某种方式关闭连接?
After about a week of diagnostics, the solution was to upgrade the axis2-transport-jms JAR to whatever the newest version is on the WSO2 Transports GitHub . 经过大约一周的诊断,解决方案是将axis2-transport-jms JAR升级到WSO2 Transports GitHub上的最新版本。
It has to be dropped into the $CARBON_HOME/repository/components/lib
directory, and the old one in $CARBON_HOME/repository/components/plugins
has to be deleted. 必须将其放入
$CARBON_HOME/repository/components/lib
目录中,并且必须删除$CARBON_HOME/repository/components/plugins
的旧目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.