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
@Test | |
public void testDropConsumerPendingAMQP() throws Throwable { | |
CountDownLatch latchCreating = new CountDownLatch(1); | |
CountDownLatch blockCreate = new CountDownLatch(1); | |
CountDownLatch done = new CountDownLatch(1); | |
ActiveMQServer server = createServer(true, createDefaultConfig(true)); | |
server.start(); | |
/*server.registerBrokerPlugin(new ActiveMQServerConsumerPlugin() { | |
@Override | |
public void afterCreateConsumer(ServerConsumer consumer) throws ActiveMQException { |
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
@Test | |
public void testConsumerDroppedWithRegularClient() throws Exception { | |
int NUMBER_OF_CONNECTIONS = 100; | |
ActiveMQServer server = createServer(true, createDefaultConfig(true)); | |
server.start(); | |
Queue serverQueue = server.createQueue(new QueueConfiguration("test-queue").setRoutingType(RoutingType.ANYCAST) | |
.setAddress("test-queue") | |
.setAutoCreated(false)); |
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 | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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
def folder = new File(".") | |
def jars = folder.listFiles({ file -> file.isFile() && file.name.endsWith('.jar') }) | |
def classpath = jars.collect { it.absolutePath }.join(':') | |
println "groovy -cp '" + classpath + "' XA.groovy" |
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
import javax.jms.XAConnection; | |
import javax.jms.XASession; | |
import javax.transaction.xa.XAResource; | |
import javax.transaction.xa.Xid; | |
import org.apache.activemq.artemis.core.client.impl.ClientSessionImpl; | |
import org.apache.activemq.artemis.jms.client.ActiveMQConnection; | |
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; |
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
git clone https://github.com/apache/activemq-nms-amqp.git | |
cd activemq-nms-amqp | |
git checkout 1.8.x | |
git checkout 1.7.x | |
git checkout 2.0.x | |
git checkout main | |
cd .. | |
git clone https://github.com/rh-messaging/jira-git-report.git |
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
/** | |
* 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
/** | |
* 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
import java.net.InetAddress; | |
import java.net.InetSocketAddress; | |
public class App | |
{ | |
public static void main( String[] args ) | |
{ | |
if (args.length < 2) { | |
System.err.println("pass in host and port (number)"); | |
System.exit(-1); |
NewerOlder