Skip to content

Fix saga example: Artemis autoconfig, run-local pid tracking, unauthenticated broker image - #212

Open
Croway wants to merge 1 commit into
apache:mainfrom
Croway:worktree-fix-saga-example
Open

Fix saga example: Artemis autoconfig, run-local pid tracking, unauthenticated broker image#212
Croway wants to merge 1 commit into
apache:mainfrom
Croway:worktree-fix-saga-example

Conversation

@Croway

@Croway Croway commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Under Spring Boot 4, Artemis autoconfiguration moved to spring-boot-starter-artemis, which the saga poms didn't declare (only raw artemis-jakarta-client/pooled-jms), so spring.artemis.* properties were silently ignored and all 4 services crashed with connectionFactory must be specified. Added spring-boot-starter-artemis.
  • run-local.sh never redirected output or captured PIDs into the .pid/.log files that stop-local.sh expects, breaking the stop script. Also, mvn spring-boot:run always forks a child JVM, so the captured PID was the mvn wrapper, not the actual process — stop-local.sh now kills the forked child(ren) too.
  • Replaced the Red Hat registry AMQ broker image (registry.redhat.io/amq7/amq-broker-rhel8, requires authenticated registry credentials) with the unauthenticated apache/artemis image, in both the local docker-compose file and the OpenShift resources, since Artemis supports OPENWIRE (and the other protocols the saga services need) out of the box.

Test plan

  • mvn clean package builds all 4 saga modules with the new dependency
  • docker compose -f local-resources/compose.yaml pull succeeds with no registry auth for both apache/artemis:latest-alpine and quay.io/jbosstm/lra-coordinator:latest
  • All 4 services (payment, flight, train, app) start cleanly with no connectionFactory must be specified crash, JMS routes activate
  • Full saga execution verified end-to-end via curl -X POST http://localhost:8084/api/saga?id=1: train reserved, flight booked, both payments processed over JMS/OPENWIRE
  • run-local.sh correctly writes .pid/.log files
  • stop-local.sh now actually terminates the JVM processes (not just the mvn wrapper) and stops the containers

…nticated broker image

Under Spring Boot 4, Artemis autoconfiguration moved to spring-boot-starter-artemis,
which the saga poms didn't declare (only raw artemis-jakarta-client/pooled-jms), so
spring.artemis.* properties were silently ignored and all 4 services crashed with
"connectionFactory must be specified". Add spring-boot-starter-artemis.

run-local.sh never redirected output or captured PIDs into the .pid/.log files that
stop-local.sh expects, breaking the stop script. Also, mvn spring-boot:run always
forks a child JVM, so the captured PID was the mvn wrapper, not the actual process;
stop-local.sh now kills the forked child(ren) too.

Replace the Red Hat registry AMQ broker image (registry.redhat.io/amq7/amq-broker-rhel8,
requires authenticated registry credentials) with the unauthenticated apache/artemis
image in both the local docker-compose file and the OpenShift resources, since Artemis
supports OPENWIRE (and the other protocols the saga services need) out of the box.

Verified end-to-end locally: broker/coordinator start, all 4 services boot without
the connectionFactory crash, and a full saga run completes (train reserved, flight
booked, both payments processed over JMS/OPENWIRE). Verified stop-local.sh now
actually terminates the JVM processes and containers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EbjZemqMg395XFGDRekLBM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant