none
Reliable Delivery - WES Toolkit and UEM RRS feed

  • Question

  • Hi,

    Recently I tried using the UEM and WES Toolkit to get the Reliable Delivery working. After doing all the required configurations and making certain changes in my WES code to Raise and Event I could make Reliable Delivery work but not in entirety. I understand that UEM polls the UEM database and sends the message to the clients which have subscribed for an event.

     

    The issue is this: The client gets the required message from the UEM and then I invoke Delivery Response method of my WES to notify the WES that delivery was successful. However, it requires the correlation ID in the header which will be used to change the status of the message to be delivered in the DB. But this correlation ID is something which I do not get in any of the responses from the WES or UEM. I suspect that the UEM creates a new guid as the Reliable Delivery ID and inserts in the DB but what is the mechanism to share this Guid with the client?

    Is there a missing configuration/development step at my side or is it a bug in the Reliable Delivery implementation?

     

    Any help/clues in this direction would be of great help.

     

    Thanks.

    Friday, September 7, 2007 7:59 PM

Answers

  • Hi,

     

    Thanks for the reply. Inline is the output trace of UEM to my WES client and I do not see any header (Correlation ID).

     

    <outputMessage utc="31-Aug-07 12:19:40 PM" messageId="urn:uuid:37162846-80b0-45ec-9046-3f1645ce04a6">
        <processingStep description="Unprocessed message">
          <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
            <env:Body>
              <Root>Rishabh</Root>
            </env:Body>
          </env:Envelope>
        </processingStep>
        <processingStep description="Processed message">
          <env:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
            <env:Header>
              <wsa:Action>http://www.microsoft.com/EventProcessor</wsa:Action>
              <wsa:FaultTo>
                <wsa:Address>http://stlap02592/DemoWES/DemoWES.ashx</wsa:Address>
              </wsa:FaultTo>
              <wsa:From>
                <wsa:Address>http://stlap02592/DemoWES/DemoWES.ashx</wsa:Address>
              </wsa:From>
              <wsa:MessageID>urn:uuid:37162846-80b0-45ec-9046-3f1645ce04a6</wsa:MessageID>
              <wsa:ReplyTo>
                <wsa:Address>http://stlap02592/DemoWES/DemoWES.ashx</wsa:Address>
              </wsa:ReplyTo>
              <wsa:To>soap.tcp://stlap02592:9001/SampleServiceProxyTest</wsa:To>
            </env:Header>
            <env:Body>
              <Root>Rishabh</Root>
            </env:Body>
          </env:Envelope>
        </processingStep>
      </outputMessage>

     

    Can you help me out with it.

    Thanks,

    Rishabh Kapoor

    Thursday, November 15, 2007 7:13 PM

All replies

  •  

    Uem delivers the 'correlation Id' as part of the header when it delivers the notification to the client.

    You could get this as follows on the client:

     

    [Operation(Action = "*", Oneway = true)]

    public void NotifyEvent(Message request)

    {  

          XmlElement correlationElement = request.Header.Addressing.From.ReferenceProperties.GetElementByName(

    "CorrelationId", http://Microsoft/ConnectedServices/2006/06/VAS/ReliableDelivery/);

     

    }

     

    You should then add this element to the header of the 'DeliveryResponse' message as follows.

     

    {

    Header header = new Header();

     

    /*Add and AddressingHeader to the Header here

    some code

    */

     

    header.Properties.AddProperty(correlationElement );

    Message message = Message.CreateMessage(header, null);

    MessageSender messageSender = new MessageSender();

    messageSender.SendAsync(message);

    }

    Thursday, November 15, 2007 10:54 AM
  • Hi,

     

    Thanks for the reply. Inline is the output trace of UEM to my WES client and I do not see any header (Correlation ID).

     

    <outputMessage utc="31-Aug-07 12:19:40 PM" messageId="urn:uuid:37162846-80b0-45ec-9046-3f1645ce04a6">
        <processingStep description="Unprocessed message">
          <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
            <env:Body>
              <Root>Rishabh</Root>
            </env:Body>
          </env:Envelope>
        </processingStep>
        <processingStep description="Processed message">
          <env:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
            <env:Header>
              <wsa:Action>http://www.microsoft.com/EventProcessor</wsa:Action>
              <wsa:FaultTo>
                <wsa:Address>http://stlap02592/DemoWES/DemoWES.ashx</wsa:Address>
              </wsa:FaultTo>
              <wsa:From>
                <wsa:Address>http://stlap02592/DemoWES/DemoWES.ashx</wsa:Address>
              </wsa:From>
              <wsa:MessageID>urn:uuid:37162846-80b0-45ec-9046-3f1645ce04a6</wsa:MessageID>
              <wsa:ReplyTo>
                <wsa:Address>http://stlap02592/DemoWES/DemoWES.ashx</wsa:Address>
              </wsa:ReplyTo>
              <wsa:To>soap.tcp://stlap02592:9001/SampleServiceProxyTest</wsa:To>
            </env:Header>
            <env:Body>
              <Root>Rishabh</Root>
            </env:Body>
          </env:Envelope>
        </processingStep>
      </outputMessage>

     

    Can you help me out with it.

    Thanks,

    Rishabh Kapoor

    Thursday, November 15, 2007 7:13 PM
  • Sorry for the delay.. i am actually new to msdn.. so not checking these on a regular basis.

     

    The problem you face is due to an unfortunate bug in the RD library, which would be fixed only in the next release.

    The correlationID is delivered to the recipient (as part of the From, ReplyTo, and FaultTo reference properties) only if the the 'DeliveryReference' field in the Subscription table is non-empty. This field, you might observe, gets filled by the elements inside the 'NotifyTo' Reference properties.

     

    For example, if this was part of your subscribe request,

    <Delivery Mode="http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push">

    <NotifyTo>

    <Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">soap.tcp://localhost:11122/ReceiverService</Address>

    <ReferenceProperties xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:abc="http://abc.com">

    <abc:abc>hello</abc:abc>

    </ReferenceProperties>

    </NotifyTo>

    <NotificationSoapAction>TestUEMPushDeliveryModeAction</NotificationSoapAction>

    </Delivery>

    then, the <abc:abc> element above goes into the 'DeliveryReference' field (and the <NotificationSoapAction> element goes into the 'ReferenceParameters' field).

     

    When the message is delivered by UEM, the <abc:abc> element above goes along with the correlation element, as part of the From, ReplyTo, and FaultTo reference properties. (This is another bug, since the correct behavior would be for the <abc:abc element to go directly into the header)

     

    Regards,

    Chakrapani

    Thursday, November 29, 2007 6:26 AM