在尝试制作实时流平台时,Agora在尝试发布流时会出现以下错误。
TypeError: Cannot read property 'stringUid' of undefined
at Object.B.t._publish (AgoraRTCSDK.min.js:14)
at Object.B.t.publish (AgoraRTCSDK.min.js:14)
at e.<anonymous> (agora.js:141)
at d (runtime.js:63)
at Generator._invoke (runtime.
我的发布者(zpub.js)在循环中发布,如下所示。
async function publishLoop() {
let payload = []
_.forEach(array, (a) => {
// process a here to generate someKey and someValue
payload.push({someKey:someValue})
})
return Promise.all(payload.map(async (p) => {
await zmqp.publish({t:
我有三个(nodejs)进程P1、P2、P3。
P1的函数A完成了它的执行,它向P2发送一些数据。
P2执行它的活动,它的输出应该发送到P3。
P3工作在输入端,向P1的函数B发送一些确认数据。
这三个都是不同的节点js应用程序,并且运行在不同的服务器上(在同一个局域网中)。问题是what should be the communication mechanism between these processes.
有三种选择似乎是可行的:
1) REST (Express)
让所有进程都是Express REST,并使用http节点js包调用所需的函数
2) Pub/Sub