mDialog/scala-zeromq — pull request #10 by damienlevin (2013-09-18 19:48:50+00:00)
Title: Fixed issue where calling newSocket could be done before the initialization of the SocketManager

Since the actorOf is asynchronous there was no guarantee that the creation of a socket happened before the initialization of the SocketManager. Here is a log that shows the issue :

[18/Sep/2013 11:17:38.365] [INFO] zeromq.PollInterrupter - PollInterrupter created
[18/Sep/2013 11:17:38.366] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.366] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.366] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.366] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.366] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.366] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.366] [INFO] zeromq.ZeroMQExtension - newSocket
[18/Sep/2013 11:17:38.366] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.367] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.367] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.367] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.367] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.367] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.367] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.367] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.367] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.367] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.367] [INFO] zeromq.ZeroMQExtension - newSocket
[18/Sep/2013 11:17:38.368] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.368] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.368] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.368] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.368] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.368] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.368] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.368] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.368] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.368] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.368] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.368] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.Interrupt
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.Interrupt done
[18/Sep/2013 11:17:38.369] [INFO] zeromq.ZeroMQExtension - newSocket
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.Interrupt
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.Interrupt done
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.369] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.370] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.371] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.372] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.373] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.374] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.374] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.374] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.374] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.374] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.381] [INFO] zeromq.PollInterrupter - PollInterrupter.Interrupt
[18/Sep/2013 11:17:38.381] [INFO] zeromq.PollInterrupter - PollInterrupter.Interrupt done
[18/Sep/2013 11:17:38.381] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.382] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.383] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager
[18/Sep/2013 11:17:38.384] [INFO] zeromq.PollInterrupter - PollInterrupter.ConnectToManager done
[18/Sep/2013 11:17:38.384] [INFO] zeromq.SocketManager - SocketManager created
[18/Sep/2013 11:17:38.386] [INFO] zeromq.SocketManager - SocketManager.NewSocket
[18/Sep/2013 11:17:38.403] [INFO] zeromq.SocketManager - SocketManager.NewSocket done
[18/Sep/2013 11:17:38.403] [INFO] zeromq.SocketManager - SocketManager.NewSocket
[18/Sep/2013 11:17:38.403] [INFO] zeromq.ZeroMQExtension - newSocket done
[18/Sep/2013 11:17:38.403] [INFO] zeromq.ZeroMQExtension - newSocket
[18/Sep/2013 11:17:38.404] [INFO] zeromq.PollInterrupter - PollInterrupter.Interrupt
[18/Sep/2013 11:17:38.404] [INFO] zeromq.PollInterrupter - PollInterrupter.Interrupt done
[18/Sep/2013 11:17:38.404] [INFO] zeromq.SocketManager - SocketManager.NewSocket done
[18/Sep/2013 11:17:38.404] [INFO] zeromq.SocketManager - SocketManager.NewSocket
[18/Sep/2013 11:17:38.405] [INFO] zeromq.ZeroMQExtension - newSocket done
[18/Sep/2013 11:17:38.405] [INFO] zeromq.ZeroMQExtension - newSocket
[18/Sep/2013 11:17:38.406] [INFO] zeromq.SocketManager - SocketManager.NewSocket done
[18/Sep/2013 11:17:38.406] [INFO] zeromq.SocketManager - SocketManager.Poll
[18/Sep/2013 11:17:38.406] [INFO] zeromq.PollInterrupter - PollInterrupter.Interrupt
[18/Sep/2013 11:17:38.406] [INFO] zeromq.PollInterrupter - PollInterrupter.Interrupt done
[18/Sep/2013 11:17:38.406] [INFO] zeromq.ZeroMQExtension - newSocket done
[18/Sep/2013 11:17:38.406] [INFO] zeromq.ZeroMQExtension - newSocket
[18/Sep/2013 11:17:38.406] [INFO] zeromq.PollInterrupter - PollInterrupter.Interrupt
[18/Sep/2013 11:17:38.406] [INFO] zeromq.PollInterrupter - PollInterrupter.Interrupt done
[18/Sep/2013 11:17:38.905] [INFO] zeromq.ZeroMQExtension - newSocket creation error Futures timed out after [500 milliseconds]
[18/Sep/2013 11:17:38.907] [INFO] zeromq.ZeroMQExtension - newSocket creation error Futures timed out after [500 milliseconds]
[18/Sep/2013 11:17:38.907] [INFO] zeromq.ZeroMQExtension - newSocket creation error Futures timed out after [500 milliseconds]
[18/Sep/2013 11:17:48.406] [INFO] zeromq.SocketManager - SocketManager.Poll done
[18/Sep/2013 11:17:48.407] [INFO] zeromq.SocketManager - SocketManager.NewSocket
[18/Sep/2013 11:17:48.410] [INFO] zeromq.SocketManager - SocketManager.NewSocket done
[18/Sep/2013 11:17:48.412] [INFO] zeromq.SocketManager - SocketManager.NewSocket
[18/Sep/2013 11:17:48.413] [INFO] zeromq.SocketManager - SocketManager.NewSocket done
[18/Sep/2013 11:17:48.413] [INFO] zeromq.SocketManager - SocketManager.NewSocket
[18/Sep/2013 11:17:48.414] [INFO] akka.actor.DeadLetterActorRef - Message [akka.actor.LocalActorRef] from Actor[akka://Smoke/user/zeromq-socket-manager#621707982] to Actor[akka://Smoke/deadLetters] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[18/Sep/2013 11:17:48.414] [INFO] akka.actor.DeadLetterActorRef - Message [akka.actor.LocalActorRef] from Actor[akka://Smoke/user/zeromq-socket-manager#621707982] to Actor[akka://Smoke/deadLetters] was not delivered. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[18/Sep/2013 11:17:48.414] [INFO] zeromq.SocketManager - SocketManager.NewSocket done
[18/Sep/2013 11:17:48.414] [INFO] zeromq.SocketManager - SocketManager.Poll
[18/Sep/2013 11:17:48.415] [INFO] akka.actor.DeadLetterActorRef - Message [akka.actor.LocalActorRef] from Actor[akka://Smoke/user/zeromq-socket-manager#621707982] to Actor[akka://Smoke/deadLetters] was not delivered. [3] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[18/Sep/2013 11:17:58.416] [INFO] zeromq.SocketManager - SocketManager.Poll done