이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 3. Getting started
This chapter guides you through a simple exercise to help you get started using AMQ .NET.
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:
Procedure
- Install the broker.
- Create a broker instance. Enable anonymous access.
Start the broker instance and check the console for any critical errors logged during startup.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the
artemis queue
command to create a queue calledservice_queue
.<broker-instance-dir>/bin/artemis queue create --name service_queue --auto-create-address --anycast
<broker-instance-dir>/bin/artemis queue create --name service_queue --auto-create-address --anycast
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You are prompted to answer a series of questions. For yes or 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.
Solution File | Visual Studio Version |
---|---|
| Visual Studio 2013 |
| 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.
D:\>cd <install-dir>\bin\Debug D:\>HelloWorld-Simple Hello world!
D:\>cd <install-dir>\bin\Debug
D:\>HelloWorld-Simple
Hello world!