Search in sources :

Example 1 with LastValueQueue

use of org.apache.activemq.artemis.core.server.impl.LastValueQueue in project activemq-artemis by apache.

the class SessionCreateAndDeleteQueueTest method testAddressSettingUSed.

@Test
public void testAddressSettingUSed() throws Exception {
    server.getAddressSettingsRepository().addMatch(address.toString(), new AddressSettings().setDefaultLastValueQueue(true));
    ClientSession session = createSessionFactory(locator).createSession(false, true, true);
    SimpleString filterString = new SimpleString("x=y");
    session.createQueue(address, queueName, filterString, false);
    Binding binding = server.getPostOffice().getBinding(queueName);
    Assert.assertTrue(binding.getBindable() instanceof LastValueQueue);
    session.close();
}
Also used : Binding(org.apache.activemq.artemis.core.postoffice.Binding) AddressSettings(org.apache.activemq.artemis.core.settings.impl.AddressSettings) LastValueQueue(org.apache.activemq.artemis.core.server.impl.LastValueQueue) ClientSession(org.apache.activemq.artemis.api.core.client.ClientSession) SimpleString(org.apache.activemq.artemis.api.core.SimpleString) Test(org.junit.Test)

Aggregations

SimpleString (org.apache.activemq.artemis.api.core.SimpleString)1 ClientSession (org.apache.activemq.artemis.api.core.client.ClientSession)1 Binding (org.apache.activemq.artemis.core.postoffice.Binding)1 LastValueQueue (org.apache.activemq.artemis.core.server.impl.LastValueQueue)1 AddressSettings (org.apache.activemq.artemis.core.settings.impl.AddressSettings)1 Test (org.junit.Test)1