Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workers not auto starting in spring boot starter #1648

Closed
sidguptajhs opened this issue Feb 11, 2023 · 1 comment
Closed

Workers not auto starting in spring boot starter #1648

sidguptajhs opened this issue Feb 11, 2023 · 1 comment
Labels
invalid This doesn't seem right

Comments

@sidguptajhs
Copy link

sidguptajhs commented Feb 11, 2023

Issue in io.temporal:temporal-spring-boot-starter-alpha:1.18.1

Expected Behavior

Workers should start and workflows should be processed.

Actual Behavior

Workflows don't execute and time out. No errors in the spring logs.

Steps to Reproduce the Problem

  1. Get a spring boot starter alpha based flow working with version 1.17.0 . Use start-workers flag
  2. Change version to 1.18.1 and restart application

Specifications

  • Version: 1.18.1
  • Platform: amd64

Spring Config

spring.temporal:
  start-workers: true
  workers:
    - task-queue: z_res_proc_int
      capacity:
        max-concurrent-workflow-task-executors: 10
        max-concurrent-activity-executors: 20
        max-concurrent-local-activity-executors: 2
        max-concurrent-workflow-task-pollers: 3
        max-concurrent-activity-task-pollers: 3
      rate-limits:
        max-worker-activities-per-second: 5.0
        max-task-queue-activities-per-second: 5.0
    - task-queue: z_hc_exec
      capacity:
        max-concurrent-workflow-task-executors: 20
        max-concurrent-activity-executors: 50
        max-concurrent-local-activity-executors: 5
        max-concurrent-workflow-task-pollers: 3
        max-concurrent-activity-task-pollers: 3
      rate-limits:
        max-worker-activities-per-second: 5.0
        max-task-queue-activities-per-second: 5.0
    - task-queue: z_infra_ops
      capacity:
        max-concurrent-workflow-task-executors: 5
        max-concurrent-activity-executors: 1
        max-concurrent-local-activity-executors: 1
        max-concurrent-workflow-task-pollers: 1
        max-concurrent-activity-task-pollers: 1
      rate-limits:
        max-worker-activities-per-second: 5.0
        max-task-queue-activities-per-second: 5.0
  workflow-cache:
      max-instances: 10
      max-threads: 10
  connection:
    target: local
  workers-auto-discovery:
    packages:
      - com.sample
@Spikhalskiy
Copy link
Contributor

Spikhalskiy commented Feb 11, 2023

Since version 1.18.x ConfigurableApplicationContext.start() needs to be called for workers to auto-start. If your application has a concept of start, it's the right thing to do anyway.
https://github.com/temporalio/sdk-java/blob/master/temporal-spring-boot-autoconfigure-alpha/README.md?plain=1#L206
https://www.baeldung.com/spring-context-events#2-contextstartedevent

@Spikhalskiy Spikhalskiy added question Further information is requested invalid This doesn't seem right and removed question Further information is requested labels Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants