[rabbitmq-discuss] Wcf one-way call

Vadim Chekan kot.begemot at gmail.com
Mon Jan 3 17:37:02 GMT 2011


Hi all,

For cache invalidation purposes I am trying to implement a broadcast
as a one-way call using wcf. As long as it is a broadcast call, I
don't expect any response. So it must be one-way call. But I
experience blocking waiting for response until timeout. Most likely it
is because reasons mentioned in this article "One-way is not always
really one-way":
http://bloggingabout.net/blogs/gerben/archive/2010/02/01/wcf-best-practice-5-one-way-is-not-always-really-one-way.aspx

The Rabbit's Wcf documentation mentions that behavior *can* be marked
as one-way, in addition to a call, but it seems to me that it is
actually the only way to make one-way call working. Is there any way
to make an OperationContract one-way? Because if I mark the whole
service with one-way behavior, then I'll be in troubles if I'll mix
one and two way calls in the same service.

Vadim.

Some snippets of my code:
============================================
    [ServiceContract]
    public interface ICategoryService
    {
        [OperationContract(IsOneWay=true)]
        void InvalidateAll();
    }

        class Broadcast : ClientBase<ICategoryService>, ICategoryService
        {
            public Broadcast() : base("Category") { }

            public void InvalidateAll()
            {
                base.Channel.InvalidateAll();
            }
        }
...
...
            // broadcast the change
            using (var broadcast = new Broadcast())
            {
                broadcast.InvalidateAll();
                broadcast.Close();
            }
...
...
============================================

-- 
>From RFC 2631: In ASN.1, EXPLICIT tagging is implicit unless IMPLICIT
is explicitly specified


More information about the rabbitmq-discuss mailing list