Vilcabamba, Ecuador
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012
|
For another use I've been testing the MessageQueue Class and it looks like it may work very well for this use....
https://msdn.microsoft.com/en-us/library/system.messaging.messagequeue%28v=vs.110%29.aspx
The listener would be waiting to Receive() the message object, while apparently multiple other processes could send messages to the same queue.
The queue possibly could be named uniquely based on the instrument...so an auto trader could be listening for a decoupled message from one or more indicators, for example, on an FDAX queue.
The advantage to the MessageQueue, apparently is that it is an integral part of Windows, for the purpose of Inter Process Communication. So, it should be very fast, and be able to queue up multiple messages easily in milliseconds, from different sources (in the case I'm using it for in this test, to queue alert and trace / debugging messages external to the Ninja Output Window).
The messageQueue.Receive() method needs to be in a separate thread inside a continuous loop, because the Receive() locks the thread it is running in. If not its own thread it will freeze lock NT 7.
Also, it looks like this class needs to be referred to System.Messaging.DLL which is found (for NT 7, Net 3.5) in the Framework V2 directory.
Good luck... :-)
|