1. 启用 NIO Transport Connector
<transportConnectors> <transportConnector name="nio" uri="nio://localhost:62828"/> </transportConnectors>
客户端也需要改为 nio。
2. 目标策略
<destinationPolicy> <policyMap> <policyEntries> <policyEntry queue=">" optimizedDispatch="true" producerFlowControl="false" memoryLimit="128 mb"> <pendingSubscriberPolicy> <vmCursor /> </pendingSubscriberPolicy> </policyEntry> </policyEntries> </policyMap> </destinationPolicy>