You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Guys, so I'm trying to use RabbitMQ on Node.js to take in await functions. The sender file takes in the function and the worker file is supposed to consume and then execute it. I'm facing two problems at the moment;
In the worker file I created, the channel.consume is a callback function and once it receives the await function message, an error occurs as await can only be used in a place that has async in in the immediate top level.
I'm sending Objects through the queue and I can't seem to convert it back to it's actual object contents on the worker end, all I get is [object Object].
Any idea how I can go about this as I've checked endlessly?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey Guys, so I'm trying to use RabbitMQ on Node.js to take in await functions. The sender file takes in the function and the worker file is supposed to consume and then execute it. I'm facing two problems at the moment;
In the worker file I created, the channel.consume is a callback function and once it receives the await function message, an error occurs as await can only be used in a place that has async in in the immediate top level.
I'm sending Objects through the queue and I can't seem to convert it back to it's actual object contents on the worker end, all I get is [object Object].
Any idea how I can go about this as I've checked endlessly?
Beta Was this translation helpful? Give feedback.
All reactions