File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,12 @@ Code examples are executed via `elixir`:
14
14
15
15
Tutorial one: "Hello World!":
16
16
17
- elixir publish.exs
18
- elixir consume.exs
17
+ ``` shell
18
+ # run the publisher
19
+ elixir publish.exs
20
+
21
+ # run the consumer
22
+ elixir consume.exs
23
+ ```
19
24
20
25
To learn more, see [ ` VictorGaiva/rabbitmq-stream ` ] ( https://github.com/VictorGaiva/rabbitmq-stream ) .
Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ Mix.install([
9
9
# First we start a Connection to the RabbitMQ Server
10
10
{ :ok , connection } = RabbitMQStream.Connection . start_link ( )
11
11
12
- # We can assume the stream already exists as this sample is meant to be run after the 'publish.exs' sample
12
+ # We can assume the stream doesn't exist yet, and attempt to create it. If it already exists,
13
+ # it should be still be good to go.
14
+ RabbitMQStream.Connection . create_stream ( connection , "my_stream" )
13
15
14
16
# Now we can subscribe to the stream, receiving up to 1 chunk.
15
17
{ :ok , subscription_id } =
You can’t perform that action at this time.
0 commit comments