This handbook serves as a comprehensive guide for developers utilizing the Hermes messaging system. It details the core functionalities, architectural components, and best practices for integrating with and managing Hermes. This document focuses particularly on the client-side interaction with Hermes, covering message processing, metrics, and troubleshooting.
I. Hermes Business Message Process
Hermes is a robust, distributed messaging system designed for high-throughput, low-latency communication between applications. Understanding its core message processing workflow is crucial for effective integration. The process can be summarized in the following stages:
1. Message Creation and Publication: A client application creates a message, encapsulating the necessary data within a defined schema. This message is then published to a specific Hermes topic or queue. The choice between topic and queue depends on the messaging pattern required (publish-subscribe or point-to-point). Topics allow for one-to-many message delivery, while queues ensure one-to-one delivery. The message includes metadata such as message ID, timestamp, and potentially custom headers.
2. Message Routing and Delivery: Hermes's routing infrastructure directs the published message to the appropriate subscribers or consumers based on the target topic or queue. This involves sophisticated routing algorithms and potentially message filtering based on pre-defined criteria. The system ensures reliable message delivery, employing techniques like acknowledgment mechanisms to guarantee that messages are processed successfully.
3. Message Consumption: Subscribed clients or consumers actively listen to the designated topic or queue. Upon receiving a message, the consumer processes the message data according to its business logic. This processing might involve updating a database, triggering an external service call, or performing any other required operation.
4. Acknowledgment and Error Handling: After successful processing, the consumer acknowledges the message's receipt to Hermes. This acknowledgment confirms that the message has been handled correctly and prevents re-delivery. If an error occurs during processing, the consumer should handle the error gracefully and potentially re-queue the message for later processing or mark it as failed. Hermes offers various error handling mechanisms, such as dead-letter queues, to manage failed messages effectively.
5. Message Persistence: Hermes provides options for persistent message storage, ensuring that messages are not lost even in case of system failures. Persistent messaging enables reliable delivery, even if consumers are temporarily unavailable. The persistence mechanism can be configured to meet specific requirements for data durability and performance.
II. Hermes Business Messaging
Hermes supports several key messaging patterns crucial for building robust and scalable applications:
* Publish-Subscribe: This pattern allows multiple consumers to subscribe to a common topic and receive copies of every published message. This is ideal for scenarios requiring broadcast communication, such as event notifications or real-time updates.
* Point-to-Point: This pattern ensures that a message is delivered to only one consumer from a queue. This is suitable for scenarios where message processing order is critical or where each message needs to be processed exactly once.
* Request-Reply: This pattern enables clients to send requests to a service and receive responses. Hermes facilitates this pattern through message correlation IDs and dedicated reply queues.
* Streaming: Hermes supports high-throughput streaming of messages, enabling real-time data processing and analysis. This is particularly useful for applications dealing with large volumes of continuous data.
III. Hermes Frontend, Consumers, and Management Use Micrometer Metrics
Hermes extensively utilizes Micrometer, a comprehensive application metrics facade, to provide detailed insights into its performance and health. This section describes how Micrometer metrics are employed across different components of the Hermes system.
current url:https://ec581.com/global/hermes-client-handbook-21085