Questo contenuto non è disponibile nella lingua selezionata.

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 Fuse Management 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

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita ilBlog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

© 2024 Red Hat, Inc.