Messaging design patterns
Communication or messaging between two systems is a basic need in enterprise software development. Multiple technologies or systems communicate to use the industry standard protocols.
Types of messaging
In general, system messaging follows one of two messaging patterns:
- Synchronous
- Asynchronous
Synchronous communication is useful when the communication is one-to-one and requires an immediate response. Synchronous communication is useful in scenarios where the business logic or running a Process depends on the response or when the request fails, and the producer needs to handle the compensating actions.
Asynchronous communication is useful for long-running services, and a Process does not require an immediate response. As a result, services are decoupled from each other to isolate and distribute the running of processes, which avoids bottlenecks of service failures and inversion of control.
Pega Platform™ supports synchronous and asynchronous messaging patterns. By default, most of the processing happens synchronously. However, Pega Platform supports the configuration of asynchronous messaging or processing. You can achieve asynchronous processing in Pega Platform by running Rules or Processes in parallel.
Rules run in parallel by using the concept of multithread processing. For example, in Pega Platform, you can run a call to a queue processor, and then in another thread, you can continue executing some independent business logic available in a Data Transform or an Activity.
Processes run in parallel by using the concept of split-for-each, split-join, and spin-off flow types. Pega Platform also supports defining parallel Processes. For example, an Onboarding Case Type might run the Processes of different departments in parallel to complete employee onboarding quickly and efficiently.
Check your knowledge with the following interaction:
This Topic is available in the following Module:
Want to help us improve this content?