generated from drivly/template.do
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
29a0ee8
commit 6d3d9a5
Showing
2 changed files
with
59 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,81 @@ | ||
# kafka.do | ||
|
||
kafka.do is a simplified interface for Kafka topics, allowing you to easily manage topics for subscriptions and webhooks. | ||
`kafka.do` is a simple API for managing Kafka-based queues. Webhook URLs can be added to retrofit existing applications to consume from queues without needing to modify the application itself to subscribe to Kafka topics. Below are the available endpoints. | ||
|
||
## Endpoints | ||
|
||
### List all queues | ||
|
||
- `GET /` | ||
```http | ||
GET / | ||
``` | ||
|
||
### Consume from a queue | ||
|
||
- `GET /:queue` | ||
```http | ||
GET /:queue | ||
``` | ||
|
||
### Produce a message to a queue | ||
|
||
- `GET /:queue/send/:message` | ||
```http | ||
GET /:queue/send/:message | ||
``` | ||
|
||
### Send a batch of messages | ||
|
||
- `POST /:queue/sendBatch` | ||
```http | ||
POST /:queue/sendBatch | ||
``` | ||
|
||
```json | ||
["message1", "message2"] | ||
``` | ||
Payload: | ||
|
||
```json | ||
["message1", "message2"] | ||
``` | ||
|
||
### Acknowledge all messages as consumed | ||
|
||
- `GET /:queue/ackAll` | ||
```http | ||
GET /:queue/ackAll | ||
``` | ||
|
||
### Mark all messages to be retried | ||
|
||
- `GET /:queue/retryAll` | ||
```http | ||
GET /:queue/retryAll | ||
``` | ||
|
||
### Acknowledge a message as consumed | ||
|
||
- `GET /:queue/ack/:messageId` | ||
```http | ||
GET /:queue/ack/:messageId | ||
``` | ||
|
||
### Mark a message to be retried | ||
|
||
- `GET /:queue/retry/:messageId` | ||
```http | ||
GET /:queue/retry/:messageId | ||
``` | ||
|
||
### Automatically consume to a webhook URL | ||
|
||
- `GET /:queue/webhook/:url` | ||
```http | ||
GET /:queue/webhook/:url | ||
``` | ||
|
||
### List a queue's webhooks | ||
|
||
- `GET /:queue/webhook` | ||
```http | ||
GET /:queue/webhook | ||
``` | ||
|
||
## Parameters | ||
|
||
Each endpoint besides list creates the queue if it does not exist and accepts the following parameters to change queue behavior: | ||
|
||
- `maxBatchSize`: The maximum number of messages allowed in each batch. | ||
|
||
- `maxBatchTimeout`: The maximum number of seconds to wait until a batch is full. | ||
|
||
- `maxRetries`: The maximum number of retries for a message, if it fails or retryAll is invoked. | ||
|
||
- `deadLetterQueue`: The name of another queue to send a message if it fails processing at least maxRetries times. If a deadLetterQueue is not defined, messages that repeatedly fail processing will eventually be discarded. If there is no queue with the specified name, it will be created automatically. | ||
|
||
- `maxConcurrency`: The maximum number of concurrent consumers allowed to run at once. Leaving this unset will mean that the number of invocations will scale to the currently supported maximum. | ||
- `maxConcurrency`: The maximum number of concurrent consumers allowed to run at once. Leaving this unset means that the number of invocations will scale to the currently supported maximum. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters