org.apache.qpid.example.publisher
Class MultiMessageDispatcher

java.lang.Object
  extended by org.apache.qpid.example.publisher.MultiMessageDispatcher

public class MultiMessageDispatcher
extends Object

Class that sends parameterised number of message files to the Publisher Must set properties for host in properties file or uses in vm broker


Field Summary
protected static org.slf4j.Logger _logger
           
protected static Publisher _publisher
           
 
Constructor Summary
MultiMessageDispatcher()
           
 
Method Summary
static void cleanup(boolean topicPublisher)
          Cleanup before exit
static void main(String[] args)
          To use this main method you need to specify a path or file to use for input This class then uses file contents from the dir/file specified to generate messages to publish Intended to be a very simple way to get going with publishing using the broker
static void publish(int numMessages, boolean topicPublisher)
          Publish the content of a file or files from a directory as messages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

protected static final org.slf4j.Logger _logger

_publisher

protected static Publisher _publisher
Constructor Detail

MultiMessageDispatcher

public MultiMessageDispatcher()
Method Detail

main

public static void main(String[] args)
To use this main method you need to specify a path or file to use for input This class then uses file contents from the dir/file specified to generate messages to publish Intended to be a very simple way to get going with publishing using the broker

Parameters:
args - - must specify one value, the path to file(s) for publisher

publish

public static void publish(int numMessages,
                           boolean topicPublisher)
                    throws JMSException,
                           MessageFactoryException
Publish the content of a file or files from a directory as messages

Parameters:
numMessages - - from main args
Throws:
JMSException
MessageFactoryException - - if cannot create message from file content

cleanup

public static void cleanup(boolean topicPublisher)
Cleanup before exit



Licensed to the Apache Software Foundation