public void Handle(SendAcknowledgementCommand sendAcknowledgementCommand)
        {
            //1 send acknowledgement back via web api
            //In production this would have a retry policy
            //the error itself will trigger an nsb retry
            if (!PostAcknowledgment(sendAcknowledgementCommand))
            {
                throw new ApplicationException("Unable to return acknowledgment to the data centre");
            }

            //2 refresh the access token for the SignalrConnection if needed
            if (hubConnectionManager.AccessTokenNeedsRefresh())
            {
                hubConnectionManager.Stop();
                hubConnectionManager.Start();
            }
        }
Ejemplo n.º 2
0
 private void StartConnectionToHub()
 {
     hubConnectionManager = Container.Resolve <IHubConnectionManager>();
     hubConnectionManager.Start();
 }
 private  void StartConnectionToHub()
 {
     hubConnectionManager = Container.Resolve<IHubConnectionManager>();
     hubConnectionManager.Start();
 }