Chapter 4. Verifying the Installation


Abstract

Once the installer has completed running it is a good idea to run a simple test to ensure that Red Hat JBoss A-MQ was properly installed.
JBoss A-MQ ships with a simple client utility that can be used to verify that the software was successfully installed. You use it to create a message producer and a message consumer that connect to the broker. If they run successfully, and you see—by checking the Web console—that the broker processed the messages, then you can be confident that JBoss A-MQ was installed successfully.
To verify that JBoss A-MQ is properly installed:
  1. Log in as the user with ownership permissions for the JBoss A-MQ installation.
  2. Open a command shell at InstallDir.
  3. Start the broker using the start command.
    Windowsbin\start.bat
    Unix./bin/start
  4. Run the producer client using java -jar extras/mq-client.jar producer --user admin --password admin.
    The producer will connect to the broker and produce 100 messages. Example 4.1, “Test Producer Output” shows the producer's output.

    Example 4.1. Test Producer Output

    $ java -jar extras/mq-client.jar producer --user admin --password admin
    Using destination: queue://TEST, on broker: failover://tcp://localhost:61616 [org.apache.activemq.transport.failover.FailoverTransport] : Successfully connected to tcp://localhost:61616 [org.fusesource.mq.ProducerThread] : Sent 'test message: 0' [org.fusesource.mq.ProducerThread] : Sent 'test message: 1' [org.fusesource.mq.ProducerThread] : Sent 'test message: 2' [org.fusesource.mq.ProducerThread] : Sent 'test message: 3' [org.fusesource.mq.ProducerThread] : Sent 'test message: 4' ... [org.fusesource.mq.ProducerThread] : Sent 'test message: 99' [org.fusesource.mq.ProducerThread] : Producer thread finished Produced: 100
    $
  5. Run the consumer client using java -jar extras/mq-client.jar consumer --user admin --password admin.
    The consumer will connect to the broker and consume 100 messages. Example 4.2, “Test Consumer Output” shows the consumer's output.

    Example 4.2. Test Consumer Output

    $ java -jar extras/mq-client.jar consumer --user admin --password admin
    Using destination: queue://TEST, on broker: failover://tcp://localhost:61616 [org.apache.activemq.transport.failover.FailoverTransport] : Successfully connected to tcp://localhost:61616 Waiting for: 100 messages [org.fusesource.mq.ConsumerThread] : Received test message: 0 [org.fusesource.mq.ConsumerThread] : Received test message: 1 [org.fusesource.mq.ConsumerThread] : Received test message: 2 [org.fusesource.mq.ConsumerThread] : Received test message: 3 [org.fusesource.mq.ConsumerThread] : Received test message: 4 ... [org.fusesource.mq.ConsumerThread] : Received test message: 99 [org.fusesource.mq.ConsumerThread] : Consumer thread finished Consumed: 100 messages
    $
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.