Skip to content

Commit

Permalink
Add properties to readme
Browse files Browse the repository at this point in the history
Signed-off-by: ruromero <rromerom@redhat.com>
  • Loading branch information
ruromero committed Jun 24, 2022
1 parent 02309e9 commit de0c147
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 8 deletions.
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,39 @@ The following resources are created:

## Configuration

Cloudevents player comes with 2 modes defined in the PLAYER_MODE environment variable:
### Mode

* LOCAL: Received events are forwarded to the loopback broker. This mode is just for development and testing
* KNATIVE: The application will get the current namespace it is running in and will use the `PLAYER_BROKER`
Cloudevents-player comes with 2 modes defined in the PLAYER_MODE environment variable:

- LOCAL: Received events are forwarded to the loopback broker. This mode is just for development and testing
- KNATIVE (default): The application will get the current namespace it is running in and will use the `PLAYER_BROKER`
environment variable to decide which broker to connect to (`default` is the default broker).


```bash
# Local Mode
./target/cloudevent-player-1.1-SNAPSHOT-runner -Dplayer.mode=LOCAL

# Knative Mode
./target/cloudevent-player-1.1-SNAPSHOT-runner -Dplayer.mode=KNATIVE
```

### Broker URI

Sets the broker URI where the messages will be sent to. It will always be `localhost:8080` for `LOCAL` mode.
Overrides the name and namespace properties.

```bash
./target/cloudevent-player-1.1-SNAPSHOT-runner -Dplayer.mode=KNATIVE -Dbroker.uri=http://some-broker:1234
```

### Broker Name and Namespace

Define the broker name and namespace to guess the broker URI. The default broker name is `default` and the default
namespace will be the current namespace.

```bash
# The broker URL
./target/cloudevent-player-1.1-SNAPSHOT-runner -Dplayer.mode=KNATIVE -Dbroker.name=example -Dbroker.namespace=other
...
2022-06-24 19:08:53,681 INFO [com.red.sys.too.clo.ser.MessageService] (ForkJoinPool.commonPool-worker-3) Player mode KNATIVE - broker: http://broker-ingress.knative-eventing.svc.cluster.local/other/example
```
38 changes: 34 additions & 4 deletions src/main/filtered/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,39 @@ The following resources are created:

## Configuration

Cloudevents player comes with 2 modes defined in the PLAYER_MODE environment variable:
### Mode

* LOCAL: Received events are forwarded to the loopback broker. This mode is just for development and testing
* KNATIVE: The application will get the current namespace it is running in and will use the `PLAYER_BROKER`
Cloudevents-player comes with 2 modes defined in the PLAYER_MODE environment variable:

- LOCAL: Received events are forwarded to the loopback broker. This mode is just for development and testing
- KNATIVE (default): The application will get the current namespace it is running in and will use the `PLAYER_BROKER`
environment variable to decide which broker to connect to (`default` is the default broker).


```bash
# Local Mode
./target/cloudevent-player-${project.version}-runner -Dplayer.mode=LOCAL

# Knative Mode
./target/cloudevent-player-${project.version}-runner -Dplayer.mode=KNATIVE
```

### Broker URI

Sets the broker URI where the messages will be sent to. It will always be `localhost:8080` for `LOCAL` mode.
Overrides the name and namespace properties.

```bash
./target/cloudevent-player-${project.version}-runner -Dplayer.mode=KNATIVE -Dbroker.uri=http://some-broker:1234
```

### Broker Name and Namespace

Define the broker name and namespace to guess the broker URI. The default broker name is `default` and the default
namespace will be the current namespace.

```bash
# The broker URL
./target/cloudevent-player-${project.version}-runner -Dplayer.mode=KNATIVE -Dbroker.name=example -Dbroker.namespace=other
...
2022-06-24 19:08:53,681 INFO [com.red.sys.too.clo.ser.MessageService] (ForkJoinPool.commonPool-worker-3) Player mode KNATIVE - broker: http://broker-ingress.knative-eventing.svc.cluster.local/other/example
```

0 comments on commit de0c147

Please sign in to comment.