S90-08 practice question 25 of 35

Based on the publisher and subscriber roles established by the application of the Event-Driven Messaging pattern, which of the following statements are true?

Full set: 100 questions
Answer options
A: a service, acting as a publisher, issues event notification messages to an event management program that is responsible for broadcasting the messages Correct answer
B: a service consumer, acting as a subscriber, can selectively subscribe to specific events Correct answer
C: an intermediate event management program enters the role of subscriber when accepting event subscriptions
D: upon receiving a message associated with an event that a service consumer subscribed to, the service consumer enters the publisher role
Correct Answer:
A. a service, acting as a publisher, issues event notification messages to an event management program that is responsible for broadcasting the messages; B. a service consumer, acting as a subscriber, can selectively subscribe to specific events
Explanation

The Event-Driven Messaging pattern is based on the publish-subscribe model. A service acting as a publisher generates an event notification message and sends it to an intermediary messaging system (an event management program). This system is then responsible for distributing, or broadcasting, the message to all interested parties. A service consumer, acting as a subscriber, registers its interest in specific types of events with the messaging system. This selective subscription ensures that the consumer only receives messages relevant to its function, which is a key benefit of this pattern for achieving loose coupling. The roles are distinct; the intermediary manages subscriptions but is not a subscriber, and a subscriber does not automatically become a publisher upon message receipt.

Why Incorrect

C. An intermediate event management program acts as a broker or facilitator; it manages subscriptions but does not consume messages, hence it does not assume the subscriber role.
D. A service consumer's role is to receive and process a message as a subscriber. While it may subsequently publish a new event, the act of receiving does not change its role.

References

1. Erl, T. (2009). SOA Design Patterns. Prentice Hall.

Page 399, Section "Pattern Profile": Describes the core components: "The publisher is the service that originates the event... The subscriber is a service that has registered its interest in receiving event notification messages of a specific type." This supports the distinct roles in options A and B.

Page 401, Section "Solution": "The publisher component issues an event message that is received by one or more subscriber components... Subscribers can dynamically register and un-register their interest in specific types of events." This directly validates option B's concept of selective subscription.

Page 402, Figure 12.10: The diagram clearly shows the Publisher sending a message to a "Message-Oriented Middleware" (an event management program), which then delivers it to Subscribers. This validates the process described in option A. The diagram also shows the middleware as a distinct entity, not a subscriber, refuting option C.

Scroll to Top