Share via


Understanding Delivery Agents

Applies to: Exchange Server 2010

Delivery agents are responsible for delivering messages addressed to foreign systems that don't use the SMTP protocol. Each delivery agent works with a Delivery Agent connector. When a message is routed to a Delivery Agent connector, the associated delivery agent performs the content conversion and message delivery. Delivery agents are a significant improvement over Foreign connectors in handling non-SMTP messages in your Exchange organization.

Looking for management tasks related to managing transport servers? See Managing Transport Servers.

Contents

Delivery Agents

Adding Delivery Agents to Your Organization

Events Used by Delivery Agents

Delivery Agents

A delivery agent is a custom agent that can:

  • Establish a connection to the foreign system for message delivery.
  • Retrieve messages from the remote delivery queues on Hub Transport servers.
  • Deliver messages to the foreign system.
  • Provide acknowledgement for each successful message delivery.

While the Foreign connector architecture remains in Microsoft Exchange Server 2010, we recommend using delivery agents for routing messages to non-SMTP systems whenever possible. Delivery agents provide the following benefits:

  • They allow queue management of messages routed to foreign systems using the familiar queue management tools.
  • Because the messages no longer need to be written to and read from the file system, message delivery performance is improved.
  • They provide access to message properties with rich events for agent developers.
  • Development time for a delivery agent is faster than implementing a Foreign connector because the delivery agent can use the message representation and management features of Exchange.
  • You can now be sure that the messages are delivered to the foreign system as opposed to just being written to the Drop directory.
  • The usage of Delivery Agent connectors allows service level agreement (SLA) analysis because it's now possible to track the latency of message delivery to the foreign system.

Return to top

Adding Delivery Agents to Your Organization

To use a delivery agent in your organization, you have to complete the following:

  • Acquire the delivery agent. Typically, delivery agents are written by third parties. Exchange 2010 comes with only one Delivery Agent connector by default: the Text Messaging Delivery Agent connector.
  • Install the delivery agent on your Hub Transport servers that will act as source servers for the Delivery Agent connectors.
  • Create a Delivery Agent connector for the specific protocol.

When all of these steps are completed, messages to the foreign systems will be routed through the Delivery Agent connectors and processed by the delivery agent.

Delivery Agent Connectors

Don't confuse the Delivery Agent connectors with the actual delivery agents. Delivery Agent connectors are configured to make routing decisions. The Delivery Agent connectors handle queuing messages to be processed by the delivery agents; much like Send connectors or Routing Group connectors are used for SMTP delivery.

Delivery Agent connectors ensure that the messages destined to the foreign system are inserted into the appropriate queues on the Hub Transport servers that are used for delivering messages to the foreign systems. After the messages are queued, Connection Manager invokes the delivery agent to handle the actual delivery of the message to the foreign system.

Return to top

Events Used by Delivery Agents

Delivery agents act on the following events raised by the Connection Manager component:

  • OnOpenConnection   This event is raised when there are messages in the queue to be delivered to the foreign system. It notifies the delivery agent to initiate a connection to the foreign system.
  • OnDeliverMailItem   This event notifies the delivery agent to retrieve the next item from the queue.
  • OnCloseConnection   This event is raised when there are no more messages in the queue to be delivered to the foreign system. It notifies the delivery agent to close the connection to the foreign system.

In a typical delivery scenario, the following interaction between Connection Manager and the delivery agent takes place:

  1. Connection Manager detects messages queued for delivery to the foreign system.
  2. Connection Manager invokes the delivery agent using the OnOpenConnection event.
  3. The delivery agent establishes a connection with the foreign system. After the connection is established, it notifies Connection Manager using the RegisterConnection method.
  4. Connection Manager raises the OnDeliverMailItem event.
  5. The delivery agent retrieves the message from the queue and delivers it to the foreign system. After delivery is complete, it provides acknowledgement to Connection Manager.
  6. If there are additional messages in the queue, steps 4 and 5 are repeated until all messages are delivered.
  7. Connection Manager raises the OnCloseConnection event.
  8. The delivery agent closes the connection with the foreign system and notifies Connection Manager using the UnRegisterConnection method.

Retry Situations

The following are the situations where messages or the entire Delivery Agent connector queue would end up in the Retry state:

  • After Connection Manager raises the OnOpenConnection event, if no delivery agents respond with the RegisterConnection method, the entire queue for that Delivery Agent connector is put into retry.
  • If the delivery agent doesn't provide an acknowledgement for a specific message, that message is put into retry.

Return to top