[E2010][TA][C#] Getting EventId in custom Transport Agent RRS feed

  • Question

  • I have my custom Transport Agent and I need to get EventId of message it's processing. How to do that?
    Wednesday, August 24, 2011 12:34 PM

All replies

  • Adam,

    Not sure I follow you...

    You want to know what event (submission, resolved, routed or categorized) a given message is in at a given time - is that correct ?

    You don't mean the "Message ID" of the message instead?

    - Scott Quinn

    Thursday, August 25, 2011 9:42 AM
  • Thanks for response.

    By the event I mean that event (EventId) which is available in Get-MessageTrackingLog. I don't know if it's good moment (in Transport Agent) to learn that (tell me if it's not :)), but I'd like to get information like in Get-MassageTrackingLog. The events type I need are described: (Table 1., Table2.).

    Unfortunately, parsing Get-MessagetrackingLog output is not acceptable solution.

    Thursday, August 25, 2011 10:53 AM
  • Ahhh... the tracking log event ids.

    Ok sorry, didn't occur to me to want to look at logs from within an agent.

    I take it that you want to know the 'end fate' of the messages ( passing through an agent ) ? 

    Ummmm ... .I'll have to think about how you could access that data... and quickly (you don't want to take a long time doing anything in an agent event).

    Note: Some of these events will occur before and some after a message passes though an agent type (and there are 3 different types of agent). For example, DELIVER won't be logged during the message's time in a routing agent because delivery happens later on and some events like BADMAIL you will never see in an agent because if a message is badly formatted no agent ever sees it.

    - Scott


    Thursday, August 25, 2011 1:38 PM