Skip to content

Add default logging for bad IPC messages #584

@jonathonmcmurray

Description

@jonathonmcmurray

kdb+'s default behaviour when a malformed IPC message is received is to signal 'badmsg and close the offending connection. This is somewhat unhelpful for investigating e.g. when you have multiple feedhandlers etc. - there's no way of knowing which one sent the bad message.

kdb+ has a handler, .z.bm, that will be called (if defined) when a malformed IPC message is received. Currently TorQ doesn't define this handler.

I think we should put in a default handler - we can use the handle the bad message was sent over to look up in .clients.clients and/or .servers.SERVERS and get some more identifying information e.g. host, username etc. (obviously if multiple feedhandlers run on same host, this will only really be useful if each uses a unique username). Then we can print a more descriptive error log to identify the offending message sender & allow for further investigation.

We can probably also store the offending raw message, similar to the example on code.kx.com.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions