These are chat archives for christopherread/Obvs

Apr 2016
Apr 25 2016 15:45

@inter8ection Thanks for the quick turnaround. Upgraded my projects with your newer nuget package and it fixes the socket error. I do get a different error now, when I close the service down (a console app with topshelf, just running in console mode for now), which I wasn't getting before:-

2016-04-25 16:33:25 ERROR [ServiceEndpoint[IRxTestMessage]] Error receiving requests NetMQ.TerminatingException: CheckContextTerminated - yes, is terminated.
at NetMQ.Core.SocketBase.CheckContextTerminated()
at NetMQ.Core.SocketBase.ProcessCommands(Int32 timeout, Boolean throttle)
at NetMQ.Core.SocketBase.TryRecv(Msg& msg, TimeSpan timeout)
at NetMQ.NetMQSocket.TryReceive(Msg& msg, TimeSpan timeout)
at NetMQ.ReceivingSocketExtensions.TryReceiveMultipartMessage(IReceivingSocket socket, TimeSpan timeout, NetMQMessage& message, Int32 expectedFrameCount)
at Obvs.NetMQ.Extensions.SocketExtensions.TryReceive(SubscriberSocket socket, TimeSpan timeOut, String& topic, String& typeName, Byte[]& rawMessage)
at Obvs.NetMQ.MessageSource1.ReceiveMessage(IObserver1 observer, SubscriberSocket socket)

This might be due to the forced upgrade of the NetMQ nuget package

Christopher Read
Apr 25 2016 15:57
@anthonyhawes Hey no problem :). Try checking that you are disposing of your subscriptions prior to shutting down
also, the ServiceBus itself implements IDisposable under the covers, so you can do this on shut down too
(serviceBus as IDisposable)?.Dispose();
If you bind it as a singleton using an IoC container, this may be done for you. I know Ninject does.
Apr 25 2016 16:06
@inter8ection Yep, I'd started thinking along those lines. Using the IDisposable pattern on the server subscription did not work, but using the overload that takes a CancelationToken did work. Will try the servicebus IDispose for completeness and report back
Christopher Read
Apr 25 2016 16:08
@anthonyhawes great, thanks. I personally use the Obvs.ActiveMQ transport in production, and I did the Obvs.NetMQ to try it out, but there's no reason it shouldn't work, after a few tweaks perhaps :)
Apr 25 2016 16:25
@inter8ection serviceBus IDispose also shuts everything down cleanly. Production is some way off yet. I will set up ActiveMQ at some point and compare. Thanks