wildfly 14:javax.jms.jmsexception:AMQ119030:大型消息未在服务器上初始化



我已经在野生蝇中配置了ActiveMQ子系统,如下所示。

<subsystem xmlns="urn:jboss:domain:messaging-activemq:4.0">
         <server name="default" persistence-enabled="true">
                <cluster password="${jboss.messaging.cluster.password:CHANGE ME!!}"/>
                <journal type="NIO" min-files="2"/>
                <bindings-directory path="/opt/shared/messaging/live/bindings"/>
                <journal-directory path="/opt/shared/messaging/live/journal"/>
                <large-messages-directory path="/opt/shared/messaging/live/largemessages"/>
                <paging-directory path="/opt/messaging/live/paging"/>
                <security-setting name="#">
                    <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
                </security-setting>
                <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" redelivery-delay="60000" max-delivery-attempts="5" max-size-bytes="50485760" page-size-bytes="10485760" address-full-policy="PAGE" redistribution-delay="1000"/>
                <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
                <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
                    <param name="batch-delay" value="50"/>
                </http-connector>
                <in-vm-connector name="in-vm" server-id="0">
                    <param name="buffer-pooling" value="false"/>
                </in-vm-connector>
                <http-acceptor name="http-acceptor" http-listener="default"/>
                <http-acceptor name="http-acceptor-throughput" http-listener="default">
                    <param name="batch-delay" value="50"/>
                    <param name="direct-deliver" value="false"/>
                </http-acceptor>
                <in-vm-acceptor name="in-vm" server-id="0">
                    <param name="buffer-pooling" value="false"/>
                </in-vm-acceptor>
                <broadcast-group name="bg-group1" jgroups-cluster="activemq-cluster" connectors="http-connector"/>
                <discovery-group name="dg-group1" jgroups-cluster="activemq-cluster"/>
                <cluster-connection name="my-cluster" address="jms" connector-name="http-connector" discovery-group="dg-group1"/>
                <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
                <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
                <jms-queue name="TestQueue" entries="java:/jms/TestQueue java:jboss/exported/jms/TestQueue"/>
                <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
                <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector" ha="true" block-on-acknowledge="true" reconnect-attempts="-1"/>
                <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
            </server>
    </subsystem>

使用java:/connectionFactory查找'Testqueue'。最初的工作正常,但是一段时间后,它会以例外进行抛出:

1)警告消息:

AMQ212051: Invalid concurrent session usage. Sessions are not supposed to be used by more than one thread concurrently.: java.lang.Exception: trace
    at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.startCall(ClientSessionImpl.java:1457)
    at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:229)
    at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:129)
    at org.apache.activemq.artemis.jms.client.ActiveMQMessageProducer.doSendx(ActiveMQMessageProducer.java:517)
    at org.apache.activemq.artemis.jms.client.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:201)
    at com.demo.Test.executeQuery(Test.java:296)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

2)警告消息:

AMQ212054: Destination address=jms.queue.TestQueue is blocked. If the system is configured to block make sure you consume messages on this configuration.

3):在Messaging-Activemq子系统中配置的共享目录,但是处理几个记录仍会遇到以下错误。

javax.jms.JMSException: AMQ119030: large-message not initialized on server
    at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.sendSessionSendContinuationMessage(ActiveMQSessionContext.java:924)
    at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.sendLargeMessageChunk(ActiveMQSessionContext.java:502)
    at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.largeMessageSendStreamed(ClientProducerImpl.java:503)
    at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.largeMessageSendBuffered(ClientProducerImpl.java:413)
    at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.largeMessageSend(ClientProducerImpl.java:344)
    at org.apache.activemq.artemis.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:274)

步骤#1中列出了一个大问题:

AMQ212051:无效的并发会话用法。会话不应该同时使用多个线程。

并发会话用法将导致各种怪异的问题。您需要修复应用程序,以便不会同时使用会议。JMS规范不支持并发会话用法,并且被视为应用程序编程错误。

经纪人也在阻止:

AMQ212054:目标地址= JMS.Queue.SearchRequestSquequeue被阻止。如果系统被配置为阻止,请确保您在此配置上消耗消息。

经纪人可能会阻止消息发送到地址有多种原因:

  1. 如果<address-full-policy>BLOCK,并且地址已达到配置的<max-size-bytes>
  2. 如果<address-full-policy>BLOCK,并且达到了所有地址的<global-max-size>
  3. 如果达到了<max-disk-usage>

我不清楚这引起了此问题,因为您配置了PAGEglobal-max-size默认情况下是-1,默认情况下max-disk-usage100。也许您的磁盘正在报告100%使用?

相关内容

  • 没有找到相关文章

最新更新