Spring Java ActiveMQ Generator
Generate ActiveMQ Consumers
This generator enables the deployment of your OpenLegacy Hub project as an ActiveMQ service in a Java runtime environment. The output is a low-code Spring Boot project, which mirrors the contract of the generated Hub project. Each method within the Hub project is transformed into a ActiveMQ consumer, responsible for processing messages from a ActiveMQ Queue and executing the associated logic.
Once deployed and running, to incorporate the latest changes from the Hub project—such as newly added methods, removed methods, or modifications to input/output fields—simply stop and restart the service.
For projects utilizing the OPZ provider, ensure the OPZ file is updated with the new version before restarting the service to reflect the changes
Consumer Configuration:
- Type:
- Consume Only - Retrieves a message from the Consumer Queue and executes the flow logic.
- Consume Produce - Retrieves a message from the Consumer Queue, processes it, and publishes the result to the Producer Queue.
- Consumer Queue: The ActiveMQ Queue from which messages are consumed.
- Producer Queue: The ActiveMQ Queue where processed output messages are published.
- Error Handling: Defines the behavior when message processing fails.
- Commit: No action. The consumer proceeds to the next message.
- No Commit: Retries the message a few times before failing the consumer if unsuccessful.
- Dead Letter Queue (DLQ): Moves the failed message to a designated error Queue(DLQ) and continues to the next message.
- Dead Letter Queue (DLQ): If DLQ is selected in the error handling strategy, specify the ActiveMQ Queue for error messages here.
- Message Type: specify the expected message type to be consumed
- Buffer
- XML
- JSON
Example Configuration
active-mq:
client:
protocol: TCP
hostname: localhost
port: 61616
# user:
# password:
encoding: utf-8
overrideWithFlowEnrichment: true
consumers:
meth1:
queue-name: consume-queue
produce-queue-name: produce-queue
message-type: XML
flow: meth1-flow
mode: CONSUME_PRODUCE
Updated 4 months ago