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
+19-2
Original file line number
Diff line number
Diff line change
@@ -175,7 +175,7 @@ By default, `gtfs-rt-feed` will connect as `gtfs-rt-$MAJOR_VERSION` to `localhos
175
175
176
176
#### create NATS stream & consumer
177
177
178
-
We also need to create a [NATS JetStream](https://docs.nats.io/nats-concepts/jetstream)[stream](https://docs.nats.io/nats-concepts/jetstream/streams) called `AUS_ISTFAHRT_2` that `gtfs-rt-feed` will read (unmatched) GTFS-RT messages from. This can be done using the [NATS CLI](https://github.com/nats-io/natscli):
178
+
We also need to create a [NATS JetStream](https://docs.nats.io/nats-concepts/jetstream)[stream](https://docs.nats.io/nats-concepts/jetstream/streams) called `AUS_ISTFAHRT_2` that `gtfs-rt-feed` will read (unmatched) VDV-454 `AUS``IstFahrt` messages from. This can be done using the [NATS CLI](https://github.com/nats-io/natscli):
179
179
180
180
```shell
181
181
nats stream add \
@@ -192,7 +192,7 @@ nats stream add \
192
192
AUS_ISTFAHRT_2
193
193
```
194
194
195
-
On the `AUS_ISTFAHRT_2` stream, we create a durable [consumer]():
195
+
On the `AUS_ISTFAHRT_2` stream, we create a durable [consumer](https://docs.nats.io/nats-concepts/jetstream/consumers) called `gtfs-rt-feed`:
196
196
197
197
```shell
198
198
nats consumer add \
@@ -219,6 +219,23 @@ nats consumer add \
219
219
gtfs-rt-feed
220
220
```
221
221
222
+
Next, again using the NATS CLI, we'll create a stream called `GTFS_RT_2` that the `gtfs-rt-feed` service will write (matched) GTFS-RT messages into:
223
+
224
+
```shell
225
+
nats stream add \
226
+
# omit this if you want to configure more details
227
+
--defaults \
228
+
# collect all messages published to these subjects
229
+
--subjects='gtfsrt.>' \
230
+
# acknowledge publishes
231
+
--ack \
232
+
# with limited storage, discard the oldest limits first
233
+
--retention=limits --discard=old \
234
+
--description='GTFS-RT messages' \
235
+
# name of the stream
236
+
GTFS_RT_2
237
+
```
238
+
222
239
#### configure access to Redis
223
240
224
241
`gtfs-rt-feed` uses [`ioredis`](https://npmjs.com/package/ioredis) to connect to PostgreSQL; For details about supported environment variables and their defaults, refer to [its docs](https://github.com/redis/ioredis#readme).
0 commit comments