BOOST.APIGateway
An HTTP-to-JMS translation gateway that exposes REST APIs for frontend clients, translates requests into JMS messages, routes them to backend compute queues, and returns responses. Built with Jersey (JAX-RS) on Jetty.
Note: This project currently lives at
C:\eclipse-workspace\PortalAPI.
Architecture
HTTP Client
↓
Jetty HTTP Server (:8080)
↓
BOOSTAuthFilter (JWT validation)
↓
Jersey Router
↓
┌─────────────────┬────────────────────────┐
│ Static Endpoints│ Dynamic Endpoints │
│ (PortalServiceV3│ (DynamicRequestInflector│
│ MinioServiceV1)│ loaded from MySQL) │
└────────┬────────┴───────────┬────────────┘
↓ ↓
ActiveMQService.send()
↓
JMS Message → AMQP Broker
↓
Wait for Reply on Temp Queue
↓
HTTP Response ← JMS ResponseHTTP → JMS Translation
Every HTTP request is translated into a JMS message:
json
{
"auth": "<bearer_token>",
"method": "<operation_name>",
"body": { /* request data */ }
}The gateway waits for a response on a temporary reply queue, then converts it back to an HTTP response with the appropriate status code.
Prerequisites
- Java 21
- AMQP Broker (ActiveMQ / RabbitMQ)
- MySQL (for dynamic endpoint definitions)
- Redis (caching, auth decisions)
- MinIO (S3-compatible file storage)
Configuration
config.properties
properties
redis_uri=redis://172.16.200.65:6379
redis_database_index=10Hardcoded Connections
| Service | URI |
|---|---|
| AMQP Broker | amqp://172.16.200.32:5672 |
| MySQL | jdbc:mysql://172.16.200.45:3306/boost_apifrontend |
| MinIO | https://s3.se-01.westbahr.net |
JMS Queues
| Queue | Purpose |
|---|---|
boostv3.stageapi.messages | Primary API requests |
boostv3.logging | Logging messages |
nimpos.api.messages | Nimpos-specific requests |
Authentication
- Bearer Token: JWT validated by
BOOSTAuthFilter - Claims extracted:
tenant_id,user_id,exp - Tokens are passed through to backend services for authorization
REST Endpoints
Authentication
| Method | Path | Description |
|---|---|---|
| POST | /BOOST/v3/authorize | User login |
| POST | /BOOST/v3/token | Generate token |
| GET | /BOOST/v3/whoami | Current user info |
Customers & Organizations
| Method | Path | Description |
|---|---|---|
| GET | /BOOST/v3/customers | List customers |
| GET | /BOOST/v3/organizations2 | Find organizations |
| POST | /BOOST/v3/organizations2 | Create organization |
| GET/PUT/DELETE | /BOOST/v3/organizations2/{id} | CRUD by ID |
Articles & Inventory
| Method | Path | Description |
|---|---|---|
| GET | /BOOST/v3/articles | Find articles |
| GET | /BOOST/v3/articles/{id} | Get by ID |
| GET | /BOOST/v3/articles/sku/{sku} | Get by SKU |
| GET | /BOOST/v3/articles/{sku}/transactions | Transaction history |
| POST | /BOOST/v3/transactions | Create transaction |
Orders
| Method | Path | Description |
|---|---|---|
| POST | /BOOST/v3/cim/orders | Create order |
| GET | /BOOST/v3/cim/orders | Find orders |
| GET/PUT/DELETE | /BOOST/v3/cim/orders/{id} | CRUD by ID |
| POST | /BOOST/v3/cim/orders/{id}/orderLines | Add order line |
| POST | /BOOST/v3/wms/purchaseorders | Create purchase order |
Invoices
| Method | Path | Description |
|---|---|---|
| POST | /BOOST/v3/cim/invoices | Create invoice |
| GET | /BOOST/v3/cim/invoices | Find invoices |
| GET | /BOOST/v3/supplierinvoices | Supplier invoices |
Files (MinIO)
| Method | Path | Description |
|---|---|---|
| GET | /BOOST/v3/files3 | List files |
| GET | /BOOST/v3/entity/{id}/files | Files by entity |
| POST | /boost/v1/minio/upload | Upload file |
Dynamic Endpoints
Additional endpoints are loaded from the boost_apifrontend MySQL database at startup:
apiBases— base path definitionsapiBaseVersions— API version configurationapiEndpoints— endpoint method, path, queue, and handler mapping
Connection Management
- Thread-local JMS connections, sessions, producers, and consumers
- Connection pool with max 10 connections (
JmsPoolConnectionFactory) - Hourly cleanup of stale thread-local resources
- Shutdown hook for graceful connection closure
Dependencies
| Dependency | Version | Purpose |
|---|---|---|
jersey-container-jetty-http | 3.1.9 | HTTP server + REST framework |
qpid-jms-client | 2.6.1 | AMQP messaging |
pooled-jms | 3.1.7 | JMS connection pooling |
mysql-connector-java | 8.0.33 | MySQL driver |
jedis | 5.2.0 | Redis client |
minio | 8.5.8 | S3 file storage |
commons-codec | 1.17.1 | Encoding utilities |
jakarta.mail | 2.0.1 | Email utilities |
Project Structure
src/main/java/com/luqon/portal/
├── api/
│ ├── app/
│ │ ├── RestServer.java # Entry point
│ │ ├── Application.java # Server init, DI
│ │ ├── BOOSTAuthFilter.java # JWT auth filter
│ │ ├── DynamicResourceRegistrator.java # DB-driven endpoints
│ │ ├── DynamicRequestInflector.java # HTTP→JMS handler
│ │ ├── CORSFilter.java
│ │ ├── RequestLoggingFilter.java
│ │ └── ResponseLoggingFilter.java
│ ├── controllers/
│ │ ├── PortalServiceV3.java # Main REST endpoints
│ │ ├── PortalServiceV2.java
│ │ ├── PortalServiceV1.java
│ │ ├── MinioServiceV1.java # File storage
│ │ └── NimposAPI.java # Payment processing
│ ├── services/
│ │ ├── ActiveMQService.java # JMS communication
│ │ ├── RedisService.java # Caching
│ │ └── LogBuilder.java # Structured logging
│ └── AuthenticationUtils.java
└── jwt/
├── AccessToken.java
├── HmacJsonWebToken.java
└── JsonWebToken.javaRunning
bash
java -cp target/PortalAPI-jar-with-dependencies.jar \
com.luqon.portal.api.app.RestServerStarts Jetty on http://localhost:8080.