-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal_start.ps1
41 lines (29 loc) · 1.19 KB
/
local_start.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
param(
[Parameter( Mandatory = $true, HelpMessage = "Please enter value")]
[string] $mq = "nothing",
[Parameter( Mandatory = $true, HelpMessage = "Please enter value")]
[int] $workers = 2,
[Parameter( Mandatory = $true, HelpMessage = "Please enter value")]
[int] $batches = 2,
[Parameter( Mandatory = $true, HelpMessage = "Please enter value")]
[int] $batchSize = 20
)
Write-Host "type : $mq"
Write-Host "workers : $workers"
Write-Host "batches : $batches"
Write-Host "batch size: $batchSize"
$Env:batches = $batches
$Env:batchSize = $batchSize
if($mq -eq "AZURE" ){
$Env:queuelib = "AZURE"
$Env:mqConnectionString = "Endpoint=sb://your azure service bus connection string here"
}
if( $mq -eq "NATS") {
$Env:queuelib = "NATS"
$Env:mqConnectionString ="nats://ruser:T0pS3cr3t@localhost:4222"
}
1..$workers | ForEach-Object {
Start-Process -FilePath dotnet -ArgumentList ".\DP.MessageHandler\bin\Debug\netcoreapp2.1\DP.MessageHandler.dll"
}
Start-Sleep 5
# Start-Process -FilePath dotnet -ArgumentList ".\DP.MessagePublisher\bin\Debug\netcoreapp2.1\DP.MessagePublisher.dll"