implement IMessageBus.Publish(string context, string typeName, string me...

...ssage)

- [ ] @srobaudo, @gmoskovicz, @feliara8 

any of you can code review this.  it's a pretty small change that will allow us to publish a message using the type name and serialized message data.
We can't do that when all we have is the type name as stored in druq_Messages it from command line input

Drew Burlingame
Principal Software Engineer, Changepoint (formerly Daptiv)

d: 206-239-7424 c: 206-660-9767 
1111 Third Avenue, Suite 700, Seattle, WA 98101
drew.burlingame@changepoint.com  www.changepoint.com<http://www.changepoint.com>
________________________________
From: Gabriel Moskovicz <notifications@github.com>
Sent: Wednesday, September 24, 2014 7:41:31 PM
To: daptiv/Daptiv.Bus
Cc: Burlingame, Drew
Subject: Re: [Daptiv.Bus] implement IMessageBus.Publish(string context, string typeName, string me... (#67)


In Druq.Client/Messaging/MessageBus.cs:

> @@ -24,17 +24,25 @@ public MessageBus(IPartitionDb partitionDb)
>
>          public void Publish<T>(string context, T message)
>          {
> +            if (message == null) throw new ArgumentNullException("message");
> +            Publish(context, message.GetType().Name, message.ToJson());
> +        }
> +
> +        public void Publish(string context, string typeName, string message)


Maybe we can pass the Type instead of a string.. so the Publish is restricted to receive Type and then resolve internally the name..

I dono if worth do it.

-
Reply to this email directly or view it on GitHub<https://github.com/daptiv/Daptiv.Bus/pull/67/files#r18012495>.