Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,12 @@ protected String getComputationType() {
}

@Bean
@Override
public Consumer<Message<String>> consumeRun() {
public Consumer<Message<String>> consumeRun1() {
return super.consumeRun();
}

@Bean
public Consumer<Message<String>> consumeRun2() {
return super.consumeRun();
}

Expand Down
11 changes: 7 additions & 4 deletions src/main/resources/config/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ spring:

cloud:
function:
definition: consumeRun;consumeCancel
definition: consumeRun1;consumeRun2;consumeCancel
stream:
bindings:
consumeRun-in-0:
consumeRun1-in-0: &consumeRunConfig
destination: ${powsybl-ws.rabbitmq.destination.prefix:}shortcircuitanalysis.run
group: shortcircuitanalysisGroup
consumer:
concurrency: 2
max-attempts: 1
consumeRun2-in-0:
<<: *consumeRunConfig
publishRun-out-0:
destination: ${powsybl-ws.rabbitmq.destination.prefix:}shortcircuitanalysis.run
publishDebug-out-0:
Expand All @@ -38,7 +39,7 @@ spring:
output-bindings: publishRun-out-0;publishDebug-out-0;publishResult-out-0;publishCancel-out-0;publishStopped-out-0:publishCancelFailed-out-0
rabbit:
bindings:
consumeRun-in-0:
consumeRun1-in-0: &consumeRunRabbitConfig
consumer:
auto-bind-dlq: true
dead-letter-exchange: ${powsybl-ws.rabbitmq.destination.prefix:}shortcircuitanalysis.run.dlx
Expand All @@ -47,6 +48,8 @@ spring:
quorum:
enabled: true
delivery-limit: 2
consumeRun2-in-0:
<<: *consumeRunRabbitConfig

computation:
s3:
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/application-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ spring:
hibernate:
#to turn off schema validation that fails (because of clob types) and blocks tests even if the the schema is compatible
ddl-auto: none
cloud:
function:
# disable consumeRun2 during test - all of them receive the "shortcircuitanalysisGroup" messages otherwise
definition: consumeRun1;consumeCancel

logging:
level:
Expand Down