Skip to content

Commit 6d6ba53

Browse files
authored
Merge pull request #1658 from commercetools/queue_docs
docs(queue): clarify usage of queue middleware
2 parents a72fd84 + b573666 commit 6d6ba53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/sdk/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If we take a step back and look at the general requirement, at the end we simply
2323

2424
In this example (integration test) we are going to make some requests to the `/channels` API endpoint. For that we need to be able to make actual requests (`http` middleware) as well as to authenticate the requests using the API Client Credentials Flow (`auth` middleware).
2525

26-
The `queue` middleware is not really necessary in this simple example but it is usually useful to limit a bit the number of concurrent requests.
26+
The `queue` middleware is not really necessary in this simple example but it is usually useful to limit a bit the number of concurrent requests and should be place before the `http` middleware.
2727

2828
The `api-request-builder` package comes in handy to easily construct the request _URI_ but it is not really necessary as the _URI_ could be also typed manually.
2929

@@ -54,7 +54,7 @@ const queueMiddleware = createQueueMiddleware({
5454
concurrency: 5,
5555
})
5656
const client = createClient({
57-
middlewares: [authMiddleware, httpMiddleware, queueMiddleware],
57+
middlewares: [authMiddleware, queueMiddleware, httpMiddleware],
5858
})
5959

6060
describe('Channels', () => {

0 commit comments

Comments
 (0)