In my publisher, I’m reading from a file with .Q.fs[…] and then calling .u.pub[…] on each chunk.
My subscribers don’t upd until either I’ve finished reading the file, or I flush the pending outgoing queues:
{ neg } each key .z.W
Is there a setting somewhere to tell it to auto-flush?
use a positive file handle for synchronous IPC in your publisher
My publisher doesn’t deal with any file handles directly, it calls .u.pub[…] :
.u.pub[trades;chunk];`
.u.pub[
I’m adapting the code from here: http://code.kx.com/wiki/Cookbook/publishsubscribe
Hi Dave
There isnt an auto flush setting. What you are doing is correct for what you are trying to do. A possible slight modification would be to use .u.w (the subscription list) to only flush the handles which are actually subscribed i.e.
.u.w[`trades][;0]
Thanks
Jonny