This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@BMRules( | |
rules = {@BMRule( | |
name = "Test Hang on Page Operations", | |
targetClass = "org.apache.activemq.artemis.core.io.nio.NIOSequentialFile", | |
targetMethod = "sync", | |
targetLocation = "ENTRY", | |
action = "org.apache.activemq.artemis.tests.extras.byteman.critical.analyser.CriticalAnalyzerTestBase.methodHang();")}) | |
@Test(timeout = 60000) | |
public void testFlushEntry() throws Exception { | |
sendConsumeDurableMessage(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NettyTransport transport = NettyTransportFactory.createTransport(""); | |
transport.setTransportListener(new NettyTransportListener() { | |
@Override | |
public void onData(ByteBuf incoming) {} | |
@Override | |
public void onTransportClosed() {} | |
@Override | |
public void onTransportError(Throwable cause) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<address-settings name="topic/#"> | |
<auto-create-adddress>true</auto-create-address> | |
<auto-create-queue>true</auto-create-queue> | |
<default-address-routing-type>MULTICAST</default-address-routing-type> | |
</address-settings> | |
<wildcard-addresses> | |
<enabled>true</enabled> | |
<delimiter>/</delimiter> | |
<any-words>#</any-words> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aliases> | |
<alias match="foo" replace="bar"> | |
<alias match="far" replace="car"> | |
</aliases> | |
<addresses> | |
<address name="queue.foo.car"> | |
<address name="queue.bar.far"> | |
</address> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<addresses> | |
<address name="jms.topic.subscriptions" type="multicast"> | |
<queues> | |
<queue name="q1" /> | |
<queue name="q2" /> | |
</queues> | |
</address> | |
<address name="jms.queue.work.tasks" type="multicast"> | |
<queues> | |
<queue name="q1" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<jms xmlns="urn:activemq:jms"> | |
<queue name="queue1"> | |
<durable>true</durable> | |
<selector string="car='red'" /> | |
</queue> | |
</jms> | |
<addresses> | |
<!--==================--> | |
<!--= JMS Queues =--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void addTransactionHandler(Coordinator coordinator, Receiver receiver) { | |
ProtonTransactionHandler transactionHandler = new ProtonTransactionHandler(sessionSPI); | |
// Start | |
// This could probably be static (doing it here for gist) | |
Coordinator resource = new Coordinator(); | |
String capabilities = "[\"amqp:local-transactions\",\"amqp:multi-txns-per-ssn\",\"amqp:multi-ssns-per-txn\"]"; | |
resource.setCapabilities(Symbol.getSymbol(capabilities)); | |
// End static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* <p> | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* <p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
} | |
} | |
@Override | |
public void handleConsumerDisconnect(ConsumerContext context) throws ActiveMQException { | |
final ClientConsumerInternal consumer = getConsumer(context); | |
if (consumer != null) { | |
Thread t = new Thread(new Runnable() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thread t = new Thread(new Runnable() { | |
@Override | |
public void run() { | |
FutureLatch future = new FutureLatch(); | |
sessionExecutor.execute(future); | |
boolean ok = future.await(ClientConsumerImpl.CLOSE_TIMEOUT_MILLISECONDS); | |
if (!ok) { | |
ActiveMQClientLogger.LOGGER.timeOutWaitingForProcessing(new Exception("trace")); | |
} |