HornetQClient から ServerLocator を作成するために、HornetQ コア API を使用しています。キューの作成には ServerLocator が使用されます。コードは次のとおりです。
TransportConfiguration connectorConfig = new TransportConfiguration(InVMConnectorFactory.class.getName());
ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(connectorConfig);
int ackBatchSize = ConfigWrapperHelper.getIntParameter(ProductMarkingConfigParamEnum.ACK_BATCH_SIZE_FOR_JMS_QUEUES);
locator.setAckBatchSize(ackBatchSize);
locator.setConsumerWindowSize(CONSUMER_WINDOW_SIZE);
locator.setClientFailureCheckPeriod(Long.MAX_VALUE);
locator.setConnectionTTL(-1);
ClientSessionFactory clientSessionFactory = locator.createSessionFactory(connectorConfig);
ClientSession clientSession = _clientSessionFactory.createSession(XA, AUTO_COMMIT_SENDS, AUTO_COMMIT_ACKS);
clientSession.createQueue(queueName, queueName, IS_DURABLE);
問題は、キューごとに max-size-bytes と te address-full-policy を設定する必要があることです。
XML でこれを行う方法は知っていますが、キューを設定するために hornetq コアを使用しているため、これらのパラメーターもコードで設定する必要があります。
これらのパラメーターを設定できる AddressSettings というクラスがあることがわかりました。
私の質問は、この AddressSettings オブジェクトを ServerLocator に構成する方法ですか?
または、HornetQCLient から作成された ServerLocator でこれらのパラメーターを設定する別の方法はありますか?