12.2.2. 使用核心 API 配置大型消息大小
如果您在客户端使用核心 API,则需要使用 setMinLargeMessageSize 方法来指定大型信息的最小大小。默认情况下,大消息(min-large-message-size)的最小大小设置为 100KB。
ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName())) locator.setMinLargeMessageSize(25 * 1024); ClientSessionFactory factory = ActiveMQClient.createClientSessionFactory();
ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName()))
locator.setMinLargeMessageSize(25 * 1024);
ClientSessionFactory factory = ActiveMQClient.createClientSessionFactory();