-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Geoffrey Hendrey <[email protected]>
- Loading branch information
1 parent
eee2b99
commit c94f007
Showing
5 changed files
with
137 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# producer will be sending some test data | ||
produceParams: | ||
type: "my-topic" | ||
data: ${[1..100].('bleep_' & $string($))} | ||
client: | ||
type: test | ||
# the subscriber's 'to' function will be called on each received event | ||
slowSubscribeParams: #parameters for subscribing to an event | ||
source: cloudEvent | ||
type: /${ produceParams.type } # subscribe to the same topic as we are publishing to test events | ||
to: /${slowAntenna} | ||
subscriberId: slowAntenna | ||
parallelism: 4 | ||
client: | ||
type: test | ||
fastSubscribeParams: | ||
source: cloudEvent | ||
type: /${ produceParams.type } # subscribe to the same topic as we are publishing to test events | ||
to: /${fastAntenna} | ||
subscriberId: fastAntenna | ||
parallelism: 2 | ||
client: | ||
type: test | ||
slowAntenna: /${ function($bleep){($sleep(100);$set('/rxSlow/-', $bleep))} } | ||
fastAntenna: /${ function($bleep){($set('/rxFast/-', $bleep))} } | ||
# starts producer function | ||
send$: $publish(produceParams) | ||
# starts consumer function | ||
recvSlow$: $subscribe(slowSubscribeParams) | ||
recvFast$: $subscribe(fastSubscribeParams) | ||
# the subscriber's `to` function will write the received data here | ||
rxFast: [ ] | ||
rxSlow: [ ] | ||
done: ${ $count(rxFast) + $count(rxSlow) = 200?'bleeps received':'still bleeping'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters