Skip to content

Commit 1bd1e1f

Browse files
fix: Fix publish from EG guide (#870)
1 parent 6bc65bd commit 1bd1e1f

1 file changed

Lines changed: 9 additions & 68 deletions

File tree

Lines changed: 9 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,18 @@
11
---
2-
title: "Publish from GCP Pub/Sub"
3-
description: "Configure Outpost to ingest published events from a GCP Pub/Sub topic and subscription."
2+
title: "Publish from Hookdeck Event Gateway"
3+
description: "Configure Outpost to ingest published events from Hookdeck Event Gateway."
44
---
55

6-
This guide provides information on using GCP Pub/Sub to publish events to Outpost.
6+
This guide provides information on using Hookdeck Event Gateway to publish events to Outpost.
77

8-
## Message Structure
8+
## Setup the Outpost API as a Destination
99

10-
GCP Pub/Sub messages should have the same payload structure as the [Publish API endpoint](/docs/outpost/publishing/events).
10+
To publish to Outpost via the Event Gateway, you can set your HTTP destination to point to the Outpost Publish API endpoint ({% $OUTPOST_API_BASE_URL %}/publish).
1111

12-
```json
13-
{
14-
"tenant_id": "<TENANT_ID>",
15-
"destination_id": "<DESTINATION_ID>", // Optional. Provide a way of routing events to a specific destination
16-
"topic": "topic.name", // Topic defined in TOPICS environment variable
17-
"eligible_for_retry": true | false, // Should event delivery be retried? Default is true.
18-
"metadata": Payload, // can be any JSON payload,
19-
"data": Payload // can be any JSON payload
20-
}
21-
```
12+
Enable Bearer Authentication with your Outpost API key.
2213

23-
## GCP Pub/Sub Setup
14+
## Payload shape & transformation
2415

25-
[Create a topic](https://cloud.google.com/pubsub/docs/create-topic) and [create a pull subscription](https://cloud.google.com/pubsub/docs/create-subscription) within GCP Pub/Sub.
16+
The payload shape must match the expected shape of the [Publish API endpoint](/docs/outpost/publishing/events).
2617

27-
Once you have these in place, you can configure Outpost to subscribe to receive events and then publish them to subscribed Outpost Destinations.
28-
29-
## Configuration
30-
31-
Provide Outpost with credentials, topic, and subscription for your GCP Pub/Sub instance used for publishing events.
32-
33-
### Environment Variables
34-
35-
```
36-
PUBLISH_GCP_PUBSUB_PROJECT=""
37-
PUBLISH_GCP_PUBSUB_SERVICE_ACCOUNT_CREDENTIALS=""
38-
PUBLISH_GCP_PUBSUB_TOPIC=""
39-
PUBLISH_GCP_PUBSUB_SUBSCRIPTION=""
40-
```
41-
42-
#### Example
43-
44-
```
45-
PUBLISH_GCP_PUBSUB_PROJECT="my-gcp-project"
46-
PUBLISH_GCP_PUBSUB_SERVICE_ACCOUNT_CREDENTIALS="single_line_json_string"
47-
PUBLISH_GCP_PUBSUB_TOPIC="outpost-publish"
48-
PUBLISH_GCP_PUBSUB_SUBSCRIPTION="outpost-publish-sub"
49-
```
50-
51-
### YAML
52-
53-
```yaml
54-
publishmq:
55-
gcp_pubsub:
56-
project: <GCP_PROJECT>
57-
service_account_credentials: <GCP_SERVICE_ACCOUNT_CREDENTIALS>
58-
topic: <GCP_PUBSUB_TOPIC>
59-
subscription: <GCP_PUBSUB_SUBSCRIPTION>
60-
```
61-
62-
#### Example
63-
64-
```yaml
65-
publishmq:
66-
gcp_pubsub:
67-
project: "GCP_PUBSUB_PROJECT" # GCP project ID
68-
service_account_credentials: "GCP_PUBSUB_SERVICE_ACCOUNT_CREDENTIALS" # Contents of service account credentials JSON file
69-
topic: "outpost-publish" # Pub/Sub to read for published events
70-
subscription: "outpost-publish-sub" # Pub/Sub subscription for published events
71-
```
72-
73-
### Troubleshooting
74-
75-
- [Ask a question](https://github.com/hookdeck/outpost/discussions/new?category=q-a)
76-
- [Report a bug](https://github.com/hookdeck/outpost/issues/new?assignees=&labels=bug&projects=&template=bug_report.md&title=%F0%9F%90%9B+Bug+Report%3A+)
77-
- [Request a feature](https://github.com/hookdeck/outpost/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=%F0%9F%9A%80+Feature%3A+)
18+
You can use a [transformation](/docs/transformations) to modify the payload shape before it is published to Outpost.

0 commit comments

Comments
 (0)