public void PublishAndExecute(object eventObject, string topic, AsyncCallback callback) { var result = new MessageAsyncResult(); var message = new Message { Body = eventObject, AsyncResult = result, AsyncCallback = callback, Topic = topic}; this.InternalPublish(message); }
public IAsyncResult PublishAndWait(object eventObject, string topic) { var result = new MessageAsyncResult(); var message = new Message { Body = eventObject, AsyncResult = result, Topic = topic}; this.InternalPublish(message); return result; }