A detailed example of Selective Message Blocking (SMB) follows. The table below represents the agent's message queue as maintained by the ZIS. The message at the top represents the oldest message in the queue and is the message that is currently being processed by the agent as the example begins.
Agent Message Queue |
SIF_Event message containing a StudentSchoolEnrollment object with an Action of Add . |
SIF_Event message containing a StudentPersonal object with an Action of Add . |
SIF_Request message for a StudentPersonal object from another agent. |
SIF_Event message containing a StudentSchoolEnrollment object with an Action of Add . |
When processing the StudentSchoolEnrollment
event, the agent requires data from a SchoolInfo
object that it doesn't have locally.
It would like to request the SchoolInfo
object without needing to process subsequent events. To do so, the agent acknowledges
the StudentSchoolEnrollment
event with an "Intermediate"
SIF_Ack
indicating that the ZIS will be contacted later to resume delivery of events. It then opens a channel to the ZIS and
submits a SIF_Request
for the SchoolInfo
object.
Upon receipt of the "Intermediate" SIF_Ack
, the ZIS freezes the delivery of any SIF_Event
messages to this agent
until the agent sends a final SIF_Ack
releasing the original event. The current state of the queue is now:
Agent Message Queue |
SIF_Event message containing a StudentSchoolEnrollment object with an Action of Add . (blocked) |
SIF_Event message containing a StudentPersonal object with an Action of Add . (frozen) |
SIF_Request message for a StudentPersonal object from another agent. |
SIF_Event message containing a StudentSchoolEnrollment object with an Action of Add . (frozen) |
The next message available for delivery to the agent is the SIF_Request
for a StudentPersonal
object.
For our example, the agent will accept the SIF_Request
by returning an "Immediate" SIF_Ack
indicating that processing is complete and the agent will hand the SIF_Request
off to another part of the agent for handling.
Meanwhile, the ZIS has deposited the SIF_Response
from the SchoolInfo
provider's agent into the queue. The queue now looks like this:
Agent Message Queue |
SIF_Event message containing a StudentSchoolEnrollment object with an Action of Add . (blocked) |
SIF_Event message containing a StudentPersonal object with an Action of Add . (frozen) |
SIF_Event message containing a StudentSchoolEnrollment object with an Action of Add . (frozen) |
SIF_Response message containing the SchoolInfo object previously requested. |
The next message the agent receives is the SIF_Response
. The agent takes the SIF_Response
and uses the information from it
along with the data in the original StudentSchoolEnrollment
event to update its database. The agent returns (Pull-Mode) or
sends (Push-Mode) an "Immediate" SIF_Ack
telling the ZIS to discard the SIF_Response
message.
The agent has now completed processing of the StudentSchoolEnrollment
event and opens a channel to the ZIS and sends a "Final"
SIF_Ack
with the message identifier for the StudentSchoolEnrollment
event. The SIF_Ack
says that the agent has completed processing and the
ZIS removes the event from the agent queue. The freeze on SIF_Event
messages is lifted and the next message to be sent to the agent
is the SIF_Event
for a StudentPersonal
Add:
Agent Message Queue |
SIF_Event message containing a StudentPersonal object with an Action of Add . |
SIF_Event message containing a StudentSchoolEnrollment object with an Action of Add . |
The "Immediate" SIF_Ack
is a SIF_Ack
message with status code of 1
. This type
of SIF_Ack
is returned as a response to a message sent by the ZIS and indicates
that the agent has persisted or has processed the message and the ZIS must remove the message from its queue.
The "Intermediate" SIF_Ack
is a SIF_Ack
message with status code of 2
.
This type of SIF_Ack
is returned as a response to an event message delivered by the ZIS and indicates that the agent has not completed processing of the event and the ZIS must not remove the event message from its queue.
The agent will send a "Final" SIF_Ack
to the ZIS in the future to signal that the ZIS can discard the event message.
An "Intermediate" SIF_Ack
message must not be returned by agents in response to messages other than SIF_Event
.
A "Final" SIF_Ack
is a
message with status code of 3
. The agent sends this type of
SIF_Ack
to the ZIS after the agent has completely processed a SIF_Event
where
it previously sent an "Intermediate" SIF_Ack
. When the ZIS
receives this message, it must discard the SIF_Event
message referenced in the SIF_Ack
upon successfully acknowledging the "Final" SIF_Ack
.