Skip to content

Commit

Permalink
Update docker commands for subscriber/publisher containers
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshLK committed Dec 9, 2024
1 parent fe3cff7 commit 5704060
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ Then execute the below command to run the program.
BAL_CONFIG_FILES=/path/to/Config.toml bal run target/bin/wbsbsubscriber.jar
```

Running the subscriber on docker.

```sh
docker run --rm --name <name-of-container> -e TOPIC_NAME="<topic-name>" -e CONSUMER_GROUP="<consumer-group>" -e HUB_URL="<hub-URL>" -e UNSUB_ON_SHUTDOWN="true" -e SVC_PORT="<subscriber-port>" --network="<docker-network-name>" --hostname=<hostname> ayeshalmeida/wbsbsubscriber:5.0.0
```

## Publishing to the Hub

Go into the `publisher` directory and execute the following command.
Expand All @@ -198,6 +204,12 @@ Then execute the below command to run the program.
BAL_CONFIG_FILES=/path/to/Config.toml bal run target/bin/wbsbpublisher.jar
```

Running the publisher on docker.

```sh
docker run --rm --network host --name websub-publisher -e TOPIC_NAME="<topic-name>" ayeshalmeida/wbsbpublisher:4.0.0
```

# Scaling the Hub
The scaling of the hub can be done vertically or horizontally. As the hub itself does not maintain any state, those can be scaled up and down as needed. The entire cluster of hubs can be considered as one unit as in you can publish to a particular hub and consume the update message from another hub.

Expand Down

0 comments on commit 5704060

Please sign in to comment.