Skip to content

Commit e9da307

Browse files
committed
revamp mq
1 parent 144704f commit e9da307

File tree

1 file changed

+21
-18
lines changed
  • src/content/docs/aws/services

1 file changed

+21
-18
lines changed

src/content/docs/aws/services/mq.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: "MQ"
3-
linkTitle: "MQ"
43
description: Get started with MQ on LocalStack
54
tags: ["Base"]
65
---
@@ -12,7 +11,7 @@ It facilitates the exchange of messages between various components of distribute
1211
AWS MQ supports popular messaging protocols like MQTT, AMQP, and STOMP, making it suitable for a wide range of messaging use cases.
1312

1413
LocalStack allows you to use the MQ APIs to implement pub/sub messaging, request/response patterns, or distributed event-driven architectures in your local environment.
15-
The supported APIs are available on our [API Coverage Page]({{< ref "coverage_mq" >}}), which provides information on the extent of MQ integration with LocalStack.
14+
The supported APIs are available on our [API Coverage Page](), which provides information on the extent of MQ integration with LocalStack.
1615

1716
## Getting started
1817

@@ -26,8 +25,8 @@ We will demonstrate how to create an MQ broker and send a message to a sample qu
2625
You can create a broker using the [`CreateBroker`](https://docs.aws.amazon.com/amazon-mq/latest/api-reference/brokers.html#brokerspost) API.
2726
Run the following command to create a broker named `test-broker` with the following configuration:
2827

29-
{{< command >}}
30-
$ awslocal mq create-broker \
28+
```bash
29+
awslocal mq create-broker \
3130
--broker-name test-broker \
3231
--deployment-mode SINGLE_INSTANCE \
3332
--engine-type ACTIVEMQ \
@@ -36,22 +35,29 @@ $ awslocal mq create-broker \
3635
--auto-minor-version-upgrade \
3736
--publicly-accessible \
3837
--users='{"ConsoleAccess": true, "Groups": ["testgroup"],"Password": "QXwV*$iUM9USHnVv&!^7s3c@", "Username": "admin"}'
39-
<disable-copy>
38+
```
39+
40+
The output will be similar to the following:
41+
42+
```json
4043
{
4144
"BrokerArn": "arn:aws:mq:us-east-1:000000000000:broker:test-broker:b-f503abb7-66bc-47fb-b1a9-8d8c51ef6545",
4245
"BrokerId": "b-f503abb7-66bc-47fb-b1a9-8d8c51ef6545"
4346
}
44-
</disable-copy>
45-
{{< / command >}}
47+
```
4648

4749
### Describe the broker
4850

4951
You can use the [`DescribeBroker`](https://docs.aws.amazon.com/amazon-mq/latest/api-reference/brokers.html#brokersget) API to get more detailed information about the broker.
5052
Run the following command to get information about the broker we created above:
5153

52-
{{< command >}}
53-
$ awslocal mq describe-broker --broker-id
54-
<disable-copy>
54+
```bash
55+
awslocal mq describe-broker --broker-id
56+
```
57+
58+
The output will be similar to the following:
59+
60+
```json
5561
b-f503abb7-66bc-47fb-b1a9-8d8c51ef6545
5662
{
5763
"BrokerArn": "arn:aws:mq:us-east-1:000000000000:broker:test-broker:b-f503abb7-66bc-47fb-b1a9-8d8c51ef6545",
@@ -73,26 +79,23 @@ b-f503abb7-66bc-47fb-b1a9-8d8c51ef6545
7379
"HostInstanceType": "mq.t2.micro",
7480
"Tags": {}
7581
}
76-
</disable-copy>
77-
{{< / command >}}
82+
```
7883

7984
### Send a message
8085

8186
Now that the broker is actively listening, we can use curl to send a message to a sample queue.
8287
Run the following command to send a message to the `orders.input` queue:
8388

84-
{{< command >}}
85-
$ curl -XPOST -d "body=message" http://admin:admin@localhost:4513/api/message\?destination\=queue://orders.input
86-
{{< / command >}}
89+
```bash
90+
curl -XPOST -d "body=message" http://admin:admin@localhost:4513/api/message\?destination\=queue://orders.input
91+
```
8792

8893
## Resource Browser
8994

9095
The LocalStack Web Application provides a Resource Browser for managing MQ brokers.
9196
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the **Resource Browser** section, and then clicking on **MQ** under the **App Integration** section.
9297

93-
<img src="mq-resource-browser.png" alt="MQ Resource Browser" title="MQ Resource Browser" width="900" />
94-
<br>
95-
<br>
98+
![MQ Resource Browser](/images/aws/mq-resource-browser.png)
9699

97100
The Resource Browser allows you to perform the following actions:
98101

0 commit comments

Comments
 (0)