Skip to content

jrodolfo/solace

Repository files navigation

Solace Workspace

CI License: MIT Java 21 Spring Boot 3.3 React 18 Vite 6 Solace

Solace Workspace is a small full-stack PubSub+ project for publishing messages, tracking publish lifecycle state, retrying failed sends, and observing direct topic traffic end to end.

It is organized as three active modules:

  • solace-broker-api: Spring Boot backend for publishing, storing, retrying, reconciling, and querying messages
  • solace-publisher-ui: React UI for publishing messages and browsing stored message history
  • solace-subscriber: Java command-line subscriber for direct Solace topic traffic

What This Project Demonstrates

  • Solace PubSub+ publishing and direct topic subscription from Java
  • a Spring Boot API that persists publish attempts before broker delivery
  • lifecycle tracking with PENDING, PUBLISHED, FAILED, stale-pending detection, retry, and manual reconciliation
  • a React/Vite publisher UI with filters, pagination, saved views, retry actions, and export flows
  • practical project documentation through architecture notes, ADRs, curl/Postman/JMeter artifacts, and setup walkthroughs

Shared Solace Contract

The backend and subscriber both use the same environment-variable names for Solace Cloud connectivity:

  • SOLACE_CLOUD_HOST
  • SOLACE_CLOUD_VPN
  • SOLACE_CLOUD_USERNAME
  • SOLACE_CLOUD_PASSWORD

The UI does not read those variables directly. It talks to solace-broker-api, which uses them on the server side.

For a screenshot-based walkthrough that shows how to create a Solace Cloud account, create a demo broker service, find these four values, and register them on Windows, Linux, or macOS, see docs/how-to/01-solace-cloud-account-demo-and-env-vars.md.

Sample destinations across the workspace use values like:

solace/java/direct/system-01

The subscriber listens to the broader direct topic pattern:

solace/java/direct/system-0*

Quick Start

1. Configure Solace Cloud

Set the shared Solace environment variables:

export SOLACE_CLOUD_HOST="tcps://..."
export SOLACE_CLOUD_VPN="..."
export SOLACE_CLOUD_USERNAME="..."
export SOLACE_CLOUD_PASSWORD="..."

Use the Solace Cloud setup guide if you need help finding those values: docs/how-to/01-solace-cloud-account-demo-and-env-vars.md.

2. Start the workspace

From the repo root:

./scripts/start-all.sh

This starts the API, UI, and subscriber together. The script prints the API health URL and the actual Vite UI URL when ready.

Common root commands:

  • ./scripts/status-all.sh: show local API, UI, and subscriber status
  • ./scripts/stop-all.sh: stop running workspace processes
  • ./scripts/restart-all.sh: stop, build, and start all modules
  • make test: run API, UI, subscriber, and script tests

For the full script inventory, see scripts/README.md.

3. Open the tools

  • API health: http://localhost:8081/rest/actuator/health
  • API docs: http://localhost:8081/docs
  • Publisher UI: http://localhost:5173 unless Vite selects another available port

Module-Level Commands

The root scripts are the preferred workflow. These commands are useful when running one module directly.

Backend:

cd solace-broker-api
mvn spring-boot:run

UI:

cd solace-publisher-ui
npm install
npm run dev

Subscriber:

cd solace-subscriber
mvn package
java -jar target/solace-subscriber-1.0-SNAPSHOT-all.jar

Module Summary

solace-broker-api

  • typed API validation and error responses
  • publish lifecycle tracking with PENDING, PUBLISHED, and FAILED
  • retry support for failed stored messages
  • manual reconciliation support for stale PENDING messages
  • paginated, filterable, sortable stored-message reads
  • normalized read DTOs instead of raw JPA serialization

solace-publisher-ui

  • typed publish form instead of a raw JSON textarea
  • optional property editing
  • paginated stored-message browser
  • lifecycle and date-range filter presets
  • single-message and bulk retry actions for failed rows
  • manual reconciliation action for stale pending rows

solace-subscriber

  • instance-based connection-property access
  • typed configuration failure on missing environment variables
  • clearer lifecycle methods and standardized logging

Continuous Integration

GitHub Actions CI runs on every push and pull request through .github/workflows/ci.yml.

The workflow currently covers:

  • root script smoke tests
  • solace-broker-api tests
  • solace-broker-api build
  • solace-publisher-ui tests with npm ci
  • solace-publisher-ui build
  • solace-subscriber tests
  • solace-subscriber build

Documentation Map

  • Architecture overview: current module boundaries, publish flow, lifecycle model, retry, reconciliation, and export behavior
  • Architecture walkthrough: concise technical narrative for understanding the design quickly
  • Architecture Decision Records: why the major design decisions were made
  • Solace Cloud setup guide: account, demo broker, credentials, and OS environment variables
  • Broker API README: backend API contract, MySQL runtime, request/response examples, and tuning settings
  • Publisher UI README: frontend behavior and development commands
  • Subscriber README: subscriber configuration and runtime behavior
  • docs/curl, docs/postman, and docs/jmeter: ready-to-use API exercise artifacts
  • docs/mysql/mysql-schema.sql: schema reference for the broker API database

GitHub About

Suggested repository description:

Full-stack Solace PubSub+ workspace with a Spring Boot broker API, React publisher UI, Java subscriber, lifecycle tracking, retry, reconciliation, and architecture documentation.

Suggested topics:

solace, pubsub, pubsubplus, spring-boot, java, react, vite, mysql, messaging, event-driven-architecture, rest-api, jms, publisher-subscriber, architecture-decision-records

Contact

License

  • MIT License
  • Copyright (c) 2026 Rod Oliveira
  • See LICENSE

About

Full-stack Solace PubSub+ workspace with a Spring Boot broker API, React publisher UI, Java subscriber, lifecycle tracking, retry, reconciliation, and architecture documentation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors