You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ Beam is an http based streaming and queueing system backed up by Apache Pulsar.
15
15
-[x] A message can be pushed to a webhook or Cloud Function for consumption.
16
16
-[x] A webhook or Cloud Function receives a message, process it and reply another message, in a response body, back to another Pulsar topic via Pulsar Beam.
17
17
-[x] Messages can be streamed via HTTP Sever Sent Event, [SSE](https://www.html5rocks.com/en/tutorials/eventsource/basics/)
18
+
-[x] Support HTTP polling of batch messages
18
19
19
20
Opening an issue and PR are welcomed! Please email `[email protected]` for any inquiry or demo.
20
21
@@ -59,6 +60,21 @@ Query parameters
59
60
2. SubscriptionInitialPosition -> supported type are `latest` as default and `earliest`
60
61
3. SubscriptionName -> the length must be 5 characters or longer. An auto-generated name will be provided in absence. Only the auto-generated subscription will be unsubscribed.
61
62
63
+
### Endpoint to poll batch messages
64
+
Polls a batch of messages always from the earliest subscription position from a topic.
These HTTP headers may be required to map to Pulsar topic.
69
+
1. Authorization -> Bearer token as Pulsar token
70
+
2. PulsarUrl -> *optional* a fully qualified pulsar or pulsar+ssl URL where the message should be sent to. It is optional. The message will be sent to Pulsar URL specified under `PulsarBrokerURL` in the pulsar-beam.yml file if it is absent.
71
+
72
+
Query parameters
73
+
1. SubscriptionType -> Supported type strings are `exclusive` as default, `shared`, and `failover`
74
+
2. SubscriptionName -> the length must be 5 characters or longer. An auto-generated name will be provided in absence. Only the auto-generated subscription will be unsubscribed.
75
+
3. size -> The batch size. The default is 10.
76
+
4. perMessageTimeoutMs -> is a wait time out for the next message to arrive. It is in milliseconds per message. The default is 300ms.
77
+
62
78
### Webhook registration
63
79
Webhook registration is done via REST API backed by a database of your choice, such as MongoDB, in momery cache, and Pulsar itself. Yes, you can use a compacted Pulsar topic as a database table to perform CRUD. The configuration parameter is `"PbDbType": "inmemory",` in the `pulsar_beam.yml` file or the env variable `PbDbType`.
64
80
@@ -149,7 +165,7 @@ One end to end test is under `./src/e2e/e2etest.go`, that performs the following
149
165
4. Verify the replied message on the sink topic
150
166
5. Delete the topic and its webhook document via RESTful API
151
167
152
-
Since the set up is non-trivial involving Pulsar Beam, a Cloud function or webhook, the test tool, and Pulsar itself with SSL, we recommend to take advantage of [the free plan at Kafkaesque.io](https://kafkaesque.io) as the Pulsar server and a Cloud Function that we have verified GCP Fcuntion, Azure Function or AWS Lambda will suffice in the e2e flow.
168
+
Since the set up is non-trivial involving Pulsar Beam, a Cloud function or webhook, the test tool, and Pulsar itself with SSL, we recommend to take advantage of [the free plan at kesque.com](https://kesque.com) as the Pulsar server and a Cloud Function that we have verified GCP Fcuntion, Azure Function or AWS Lambda will suffice in the e2e flow.
0 commit comments