Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package example;
- import org.apache.activemq.pool.PooledConnectionFactory;
- import org.apache.activemq.command.ActiveMQTopic;
- import javax.jms.*;
- class Publisher {
- public static void main(String []args) throws JMSException {
- String user = env("ACTIVEMQ_USER", "activemq");
- String password = env("ACTIVEMQ_PASSWORD", "password");
- String host = env("ACTIVEMQ_HOST", "localhost");
- int port = Integer.parseInt(env("ACTIVEMQ_PORT", "61616"));
- String destination = arg(args, 0, "event");
- int messages = 100000000;
- int size = 256;
- String DATA = "abcdefghijklmnopqrstuvwxyz";
- String body = "";
- for( int i=0; i < size; i ++) {
- body += DATA.charAt(i%DATA.length());
- }
- PooledConnectionFactory factory = new PooledConnectionFactory("tcp://" + host + ":" + port);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement