node-svmq
node-svmq copied to clipboard
receive mtype value with on data callback
Hi,
First of all thanks for the intresting project. One missing thing I have noticed is that mtype value is not provided on data event. It would be really useful to also know what was message type.
Hi @kikolehm, good suggestion. It will require some changes to the ReceiveMessageWorker in the native code to pass back either a JS object containing both mtext and mtype or a third callback parameter (err, mtext, mtype). From there, the JS data event can be modified to pass back an object:
{
data: Buffer,
type: Number
}
I'm open to pull requests if you have time to work on this yourself. Otherwise, I'll try to look into it over the next couple of weeks, but no promises.