none
Custom WCF Transport Channel RRS feed

  • Question

  • I am in the process of developing a custom WCF transport channel to integrate with a message appliance that my company has purchased. I plan on supporting the following channel types:

    • IInputChannel
    • IOutputChannel
    • IRequestChannel
    • IReplyChannel


    I have built the binding and factory types to create the listeners etc and have a working IOutputChannel, that integrates with the mesaging appliance. The message appliance supports a concept of assured delivery, i.e. the broker will keep attempting to deliver the message to a consumer until the message is acknowleged by the consumer.

    What I would like to do is to positively acknowledge a message from the appliance after it has been dispatched to a service implementation.

    I would basically like to know if the message has been processed correctly, i.e without exception or fault. I will then acknowledge the message from the broker.

    I cannot see from the interfaces above or the documentation on developing channels how this can be achived. Any hints would be appreciated.

    I have considered WS-RM but I am not convinced that the overhead of this is necessary or is the right pattern to apply.

    Tuesday, April 5, 2011 3:45 PM

Answers

  • Just to close this one off I have implemented an operation invoke behaviour that I apply. This behaviour calls back to the channel to ack the message on sucessfull execution or Nack the message on exception.
    • Marked as answer by DerekGn Wednesday, May 25, 2011 3:51 PM
    Wednesday, May 25, 2011 3:51 PM

All replies

  • how you want to notify he ACK to the appliance?

    if it is with an xml message or alike then I'm not sure why you don't use WS-RM.

    if this is over a proprietary transport then your channel can send the ack when it gets the message, assuming this is the time you want to send it.


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    Thursday, April 7, 2011 2:34 AM
  • The applicance supports the comcept of assured delivery. Basically it will guarantee to retain the message in storage until the client positively acks the message. I have built a custom transport and binding. At the moment it acks the transport message when it receives it from the message applicance.

    What I would basically like to do is defer ack of the transport message until after the message has been processed by the service higher up the channel stack.

    • Recieve transport message
    • Deserialise into Message type
    • Pass to the waiting channel above via the BeginReceiveRequest, ReceiveRequest, ReceiveRequest
    • Somehow when the message has been processed correctly get notified
    • Ack the message back to the broker

     

    Friday, April 8, 2011 5:06 PM
  • it seems that there is no real connection between the transport channels which just waits to some async notification that the message is processed, and between the messgae processing process. possibly these should be two different services, e.g. the transport channel sends the message to some other service (if on the same machien then via pipe transport) and acks the client when done.
    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    Thursday, April 14, 2011 7:46 PM
  • Yes I understand where you are coming from. My preference would be for a more integrated solution.

     

    I think that the better solution is if the broker supported transactions, I could then just use the transaction attributes.

    Thursday, April 28, 2011 2:50 PM
  • Just to close this one off I have implemented an operation invoke behaviour that I apply. This behaviour calls back to the channel to ack the message on sucessfull execution or Nack the message on exception.
    • Marked as answer by DerekGn Wednesday, May 25, 2011 3:51 PM
    Wednesday, May 25, 2011 3:51 PM