Search in sources :

Example 11 with RoutingContextImpl

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

the class MQTTRetainMessageManager method sendToQueue.

private void sendToQueue(Message message, Queue queue, Transaction tx) throws Exception {
    RoutingContext context = new RoutingContextImpl(tx);
    queue.route(message, context);
    session.getServer().getPostOffice().processRoute(message, context, false);
}
Also used : RoutingContextImpl(org.apache.activemq.artemis.core.server.impl.RoutingContextImpl) RoutingContext(org.apache.activemq.artemis.core.server.RoutingContext)

Example 12 with RoutingContextImpl

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

the class PageCursorStressTest method generateCTX.

private RoutingContextImpl generateCTX(Transaction tx) {
    RoutingContextImpl ctx = new RoutingContextImpl(tx);
    ctx.addQueue(ADDRESS, queue);
    for (Queue q : this.queueList) {
        ctx.addQueue(ADDRESS, q);
    }
    return ctx;
}
Also used : RoutingContextImpl(org.apache.activemq.artemis.core.server.impl.RoutingContextImpl) FakeQueue(org.apache.activemq.artemis.tests.unit.core.postoffice.impl.FakeQueue) Queue(org.apache.activemq.artemis.core.server.Queue)

Aggregations

RoutingContextImpl (org.apache.activemq.artemis.core.server.impl.RoutingContextImpl)12 CoreMessage (org.apache.activemq.artemis.core.message.impl.CoreMessage)8 Message (org.apache.activemq.artemis.api.core.Message)7 SimpleString (org.apache.activemq.artemis.api.core.SimpleString)7 PagedMessage (org.apache.activemq.artemis.core.paging.PagedMessage)6 PagingStoreImpl (org.apache.activemq.artemis.core.paging.impl.PagingStoreImpl)6 AddressSettings (org.apache.activemq.artemis.core.settings.impl.AddressSettings)6 Test (org.junit.Test)6 ArrayList (java.util.ArrayList)5 PagingStoreFactory (org.apache.activemq.artemis.core.paging.PagingStoreFactory)5 Page (org.apache.activemq.artemis.core.paging.impl.Page)5 NullStorageManager (org.apache.activemq.artemis.core.persistence.impl.nullpm.NullStorageManager)5 ActiveMQBuffer (org.apache.activemq.artemis.api.core.ActiveMQBuffer)4 SequentialFileFactory (org.apache.activemq.artemis.core.io.SequentialFileFactory)4 NIOSequentialFileFactory (org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory)4 PagingStore (org.apache.activemq.artemis.core.paging.PagingStore)4 FakeSequentialFileFactory (org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory)4 RoutingContext (org.apache.activemq.artemis.core.server.RoutingContext)3 CountDownLatch (java.util.concurrent.CountDownLatch)2 SequentialFile (org.apache.activemq.artemis.core.io.SequentialFile)2