Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 3. Getting Started


This chapter guides you through a simple exercise to help you get started using AMQ .NET. Before starting, make sure you have completed the steps in the Chapter 2, Installation chapter for your environment.

3.1. Preparing the Broker

The example programs require a running broker with a queue named service_queue. Follow these steps to define the queue and start the broker.

  1. Install the broker.
  2. Create a broker instance. Enable anonymous access.
  3. Start the broker instance and check the console for any critical errors logged during startup.

    $ BROKER_INSTANCE_DIR/bin/artemis run
    [...]
    14:43:20,158 INFO  [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
    [...]
    15:01:39,686 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started Acceptor at 0.0.0.0:5672 for protocols [AMQP]
    [...]
    15:01:39,691 INFO  [org.apache.activemq.artemis.core.server] AMQ221007: Server is now live
    Copy to Clipboard Toggle word wrap
  4. Use the artemis queue command to create a queue called service_queue.

    $ BROKER_INSTANCE_DIR/bin/artemis queue create --name service_queue --auto-create-address --anycast
    Copy to Clipboard Toggle word wrap

    You are prompted to answer a series of questions. For yes|no questions, type N; otherwise, press Enter to accept the default value.

3.2. Building the Examples

AMQ .NET provides example solution and project files to help users get started quickly.

Navigate to INSTALL_DIR and open one of the solution files.

Expand
Solution FileVisual Studio Version

amqp.sln

Visual Studio 2013

amqp-vs2012.sln

Visual Studio 2012

Select Build Solution from the Build menu to compile the solution.

3.3. Running Hello World

Open a command prompt window and execute these commands to send and receive a message.

$ cd _INSTALL_DIR_\bin\Debug
$ HelloWorld-Simple
Hello world!
Copy to Clipboard Toggle word wrap
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat