Message Exchange Patterns

A provider generates and responds to messages according to the operations defined in the interface it offers. The interface is always written from the perspective of the provider. That is, if an interface says that the messages are input and then output, the provider first receives a message and then sends a message. A consumer uses a service, and interprets an interface in order to consume a service. The consumer handles messages in the opposite direction from the provider.

A message exchange pattern (MEP) defines the sequence and cardinality of messages sent between the provider and the consumer. MEPs contain both normal and fault messages. TIBCO ActiveMatrix software supports following MEPs:

  • One-Way (In-Only) A consumer sends a message to a provider.
  • Request-Response (In-Out) A consumer sends a message to a provider, with expectation of response. The provider sends a response message. The provider may generate a fault if it fails to process the message.
  • Request-Response (Out-In) A provider sends a message to a consumer, with expectation of response. The consumer sends a response message. The consumer may generate a fault if it fails to process the message.
  • One-Way (Out-Only) A provider sends message to a consumer.

Faults are errors that can occur at any point during the processing of a message. Faults can also be thrown by the target service while processing messages. In service-oriented applications, clients expect specific fault responses to be returned when errors occur. For example, SOAP clients expect a SOAP fault message to be returned when an error occurs during processing. Each implementation type supports methods for generating faults in response to error conditions.