Search in sources :

Example 1 with CustomHeaderLinkStrategy

use of org.apache.activemq.artemis.rest.util.CustomHeaderLinkStrategy in project activemq-artemis by apache.

the class ClientAckQueueTest method testSuccessFirstX2.

@Test
public void testSuccessFirstX2() throws Exception {
    String testName = "testSuccessFirstX2";
    QueueDeployment queueDeployment = new QueueDeployment(testName, true);
    manager.getQueueManager().deploy(queueDeployment);
    manager.getQueueManager().setLinkStrategy(new LinkHeaderLinkStrategy());
    testSuccessFirst(1, testName);
    manager.getQueueManager().setLinkStrategy(new CustomHeaderLinkStrategy());
    testSuccessFirst(3, testName);
}
Also used : CustomHeaderLinkStrategy(org.apache.activemq.artemis.rest.util.CustomHeaderLinkStrategy) QueueDeployment(org.apache.activemq.artemis.rest.queue.QueueDeployment) LinkHeaderLinkStrategy(org.apache.activemq.artemis.rest.util.LinkHeaderLinkStrategy) Test(org.junit.Test)

Example 2 with CustomHeaderLinkStrategy

use of org.apache.activemq.artemis.rest.util.CustomHeaderLinkStrategy in project activemq-artemis by apache.

the class ClientAckQueueTest method testPullX2.

@Test
public void testPullX2() throws Exception {
    String testName = "testPullX2";
    QueueDeployment queueDeployment = new QueueDeployment(testName, true);
    manager.getQueueManager().deploy(queueDeployment);
    manager.getQueueManager().setLinkStrategy(new LinkHeaderLinkStrategy());
    testPull(1, testName);
    manager.getQueueManager().setLinkStrategy(new CustomHeaderLinkStrategy());
    testPull(4, testName);
}
Also used : CustomHeaderLinkStrategy(org.apache.activemq.artemis.rest.util.CustomHeaderLinkStrategy) QueueDeployment(org.apache.activemq.artemis.rest.queue.QueueDeployment) LinkHeaderLinkStrategy(org.apache.activemq.artemis.rest.util.LinkHeaderLinkStrategy) Test(org.junit.Test)

Example 3 with CustomHeaderLinkStrategy

use of org.apache.activemq.artemis.rest.util.CustomHeaderLinkStrategy in project activemq-artemis by apache.

the class ClientAckQueueTest method testAckTimeoutX2.

@Test
public void testAckTimeoutX2() throws Exception {
    QueueDeployment deployment = new QueueDeployment();
    deployment.setConsumerSessionTimeoutSeconds(1);
    deployment.setDuplicatesAllowed(true);
    deployment.setDurableSend(false);
    deployment.setName("testAck");
    manager.getQueueManager().deploy(deployment);
    manager.getQueueManager().setLinkStrategy(new LinkHeaderLinkStrategy());
    testAckTimeout();
    manager.getQueueManager().setLinkStrategy(new CustomHeaderLinkStrategy());
    testAckTimeout();
}
Also used : CustomHeaderLinkStrategy(org.apache.activemq.artemis.rest.util.CustomHeaderLinkStrategy) QueueDeployment(org.apache.activemq.artemis.rest.queue.QueueDeployment) LinkHeaderLinkStrategy(org.apache.activemq.artemis.rest.util.LinkHeaderLinkStrategy) Test(org.junit.Test)

Example 4 with CustomHeaderLinkStrategy

use of org.apache.activemq.artemis.rest.util.CustomHeaderLinkStrategy in project activemq-artemis by apache.

the class ClientAckQueueTest method testReconnectX2.

@Test
public void testReconnectX2() throws Exception {
    String testName = "testReconnectX2";
    QueueDeployment queueDeployment = new QueueDeployment(testName, true);
    manager.getQueueManager().deploy(queueDeployment);
    manager.getQueueManager().setLinkStrategy(new LinkHeaderLinkStrategy());
    testReconnect(testName);
    manager.getQueueManager().setLinkStrategy(new CustomHeaderLinkStrategy());
    testReconnect(testName);
}
Also used : CustomHeaderLinkStrategy(org.apache.activemq.artemis.rest.util.CustomHeaderLinkStrategy) QueueDeployment(org.apache.activemq.artemis.rest.queue.QueueDeployment) LinkHeaderLinkStrategy(org.apache.activemq.artemis.rest.util.LinkHeaderLinkStrategy) Test(org.junit.Test)

Example 5 with CustomHeaderLinkStrategy

use of org.apache.activemq.artemis.rest.util.CustomHeaderLinkStrategy in project activemq-artemis by apache.

the class ClientAckTopicTest method testAckTimeoutX2.

@Test
public void testAckTimeoutX2() throws Exception {
    TopicDeployment deployment = new TopicDeployment();
    deployment.setConsumerSessionTimeoutSeconds(1);
    deployment.setDuplicatesAllowed(true);
    deployment.setDurableSend(false);
    deployment.setName("testAck");
    manager.getTopicManager().deploy(deployment);
    manager.getTopicManager().setLinkStrategy(new LinkHeaderLinkStrategy());
    testAckTimeout();
    manager.getTopicManager().setLinkStrategy(new CustomHeaderLinkStrategy());
    testAckTimeout();
}
Also used : CustomHeaderLinkStrategy(org.apache.activemq.artemis.rest.util.CustomHeaderLinkStrategy) TopicDeployment(org.apache.activemq.artemis.rest.topic.TopicDeployment) LinkHeaderLinkStrategy(org.apache.activemq.artemis.rest.util.LinkHeaderLinkStrategy) Test(org.junit.Test)

Aggregations

CustomHeaderLinkStrategy (org.apache.activemq.artemis.rest.util.CustomHeaderLinkStrategy)6 LinkHeaderLinkStrategy (org.apache.activemq.artemis.rest.util.LinkHeaderLinkStrategy)6 Test (org.junit.Test)5 QueueDeployment (org.apache.activemq.artemis.rest.queue.QueueDeployment)4 InputStreamReader (java.io.InputStreamReader)1 Reader (java.io.Reader)1 StringReader (java.io.StringReader)1 URL (java.net.URL)1 JAXBContext (javax.xml.bind.JAXBContext)1 ClientSessionFactory (org.apache.activemq.artemis.api.core.client.ClientSessionFactory)1 ServerLocator (org.apache.activemq.artemis.api.core.client.ServerLocator)1 DestinationSettings (org.apache.activemq.artemis.rest.queue.DestinationSettings)1 TopicDeployment (org.apache.activemq.artemis.rest.topic.TopicDeployment)1 LinkStrategy (org.apache.activemq.artemis.rest.util.LinkStrategy)1 TimeoutTask (org.apache.activemq.artemis.rest.util.TimeoutTask)1