This depends a lot on you.
osquery normally outputs to files or a remote TLS server.
The simple thing is to have your other process read it’s files.
The less simple thing is to have the other thing act as a TLS endpoint.
If you cannot change the other process, you could probably write a logger plugin to run with osquery. Which would receive the logs over the thrift socket, and then do whatever you wanted with them. This could be written in any language, there are reasonable SDKs for go and python. c++ is a bit weird,