Skip to content

Commit

Permalink
Merge pull request #30 from cam-inc/feature/fix-pubsub-env-template
Browse files Browse the repository at this point in the history
Fix: add pubsub ordering key description
  • Loading branch information
KenFujimoto12 authored Jan 18, 2023
2 parents 7a41f1e + c5ccb14 commit b76d386
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/gcp/gke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ EXPORT_DESTINATION=bigquery,pubsub
```

### Pubsub Ordering (optional)
If you want to order message in pubsub, set ```PUBSUB_ORDERING_BY``` env.
If you want to order message in pubsub, set ```PUBSUB_ORDERING_BY``` env.<br>
Specify the field name of one of the Change Streams.<br>
https://cloud.google.com/pubsub/docs/ordering

**NOTICE**
ordering message can cause performance issues.

ordering message can cause performance issues.<br>
see https://medium.com/google-cloud/google-cloud-pub-sub-ordered-delivery-1e4181f60bc8

### BigQuery schema (optional)
Expand Down
5 changes: 3 additions & 2 deletions docs/gcp/gke/README_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ EXPORT_DESTINATION=bigquery,pubsub
```

### Pubsub Ordering (オプション)
メッセージの順序指定を利用したい場合、環境変数```PUBSUB_ORDERING_BY```を設定する必要があります。
メッセージの順序指定を利用したい場合、環境変数```PUBSUB_ORDERING_BY```を設定する必要があります。<br>
Change Streamsのいずれかのフィールド名を指定します。<br>
https://cloud.google.com/pubsub/docs/ordering

**注意**
メッセージの順序指定はパフォーマンスに悪影響をもたらす可能性があります。
メッセージの順序指定はパフォーマンスに影響をもたらす可能性があります。<br>
参照: https://medium.com/google-cloud/google-cloud-pub-sub-ordered-delivery-1e4181f60bc8

### BigQuery スキーマ (オプション)
Expand Down
12 changes: 12 additions & 0 deletions docs/gcp/gke/helm/templates/stateless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ spec:
# secretKeyRef:
# name: {{ $.Values.secrets.name }}
# key: BIGQUERY_TABLE_{{ $collection }}
# # Optional
# - name: PUBSUB_TOPIC_NAME
# valueFrom:
# secretKeyRef:
# name: {{ $.Values.secrets.name }}
# key: PUBSUB_TOPIC_NAME{{ $collection }}
# # Optional
# - name: PUBSUB_ORDERING_BY
# valueFrom:
# secretKeyRef:
# name: {{ $.Values.secrets.name }}
# key: PUBSUB_ORDERING_BY{{ $collection }}
- name: RESUME_TOKEN_VOLUME_DIR
valueFrom:
secretKeyRef:
Expand Down
2 changes: 2 additions & 0 deletions docs/gcp/gke/secrets.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ EXPORT_DESTINATION=
# Optional
## You have to specify this environment variable if you want to export Cloud PubSub.
PUBSUB_TOPIC_NAME=
## You have to specify this environment variable if you want to take advantage of PubSub message ordering.
PUBSUB_ORDERING_BY=

# Require
## Specify the time zone you run this middleware by referring to the following. (e.g. TIME_ZONE=Asia/Tokyo)
Expand Down

0 comments on commit b76d386

Please sign in to comment.