Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
N
node-bigstream
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bs
node-bigstream
Commits
1aeaaaf2
Commit
1aeaaaf2
authored
Jun 01, 2020
by
Kamron Aroonrua
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
buff from
parent
6bdeb8aa
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
event-pub.js
lib/amqp/event-pub.js
+1
-1
queuecaller.js
lib/amqp/queuecaller.js
+1
-1
rpccaller.js
lib/amqp/rpccaller.js
+1
-1
rpcserver.js
lib/amqp/rpcserver.js
+1
-1
No files found.
lib/amqp/event-pub.js
View file @
1aeaaaf2
...
@@ -40,7 +40,7 @@ EventPub.prototype.send = function(topic,msg)
...
@@ -40,7 +40,7 @@ EventPub.prototype.send = function(topic,msg)
{
{
var
self
=
this
;
var
self
=
this
;
this
.
open
(
function
(
err
){
this
.
open
(
function
(
err
){
self
.
ch
.
publish
(
self
.
name
,
topic
,
new
Buffer
(
JSON
.
stringify
(
msg
)));
self
.
ch
.
publish
(
self
.
name
,
topic
,
Buffer
.
from
(
JSON
.
stringify
(
msg
)));
});
});
}
}
...
...
lib/amqp/queuecaller.js
View file @
1aeaaaf2
...
@@ -41,7 +41,7 @@ QueueCaller.prototype.send = function(msg)
...
@@ -41,7 +41,7 @@ QueueCaller.prototype.send = function(msg)
if
(
err
){
if
(
err
){
console
.
log
(
err
);
console
.
log
(
err
);
}
}
self
.
ch
.
sendToQueue
(
self
.
name
,
new
Buffer
(
JSON
.
stringify
(
msg
)),
{
persistent
:
true
});
self
.
ch
.
sendToQueue
(
self
.
name
,
Buffer
.
from
(
JSON
.
stringify
(
msg
)),
{
persistent
:
true
});
});
});
}
}
...
...
lib/amqp/rpccaller.js
View file @
1aeaaaf2
...
@@ -51,7 +51,7 @@ RPCCaller.prototype.call = function(req,cb){
...
@@ -51,7 +51,7 @@ RPCCaller.prototype.call = function(req,cb){
self
.
ch
.
responseEmitter
.
once
(
corr
,
(
resp
)
=>
{
self
.
ch
.
responseEmitter
.
once
(
corr
,
(
resp
)
=>
{
cb
(
null
,
resp
);
cb
(
null
,
resp
);
});
});
self
.
ch
.
sendToQueue
(
self
.
name
,
new
Buffer
(
JSON
.
stringify
(
req
)),
{
correlationId
:
corr
,
replyTo
:
REPLY_QUEUE
,
persistent
:
false
})
self
.
ch
.
sendToQueue
(
self
.
name
,
Buffer
.
from
(
JSON
.
stringify
(
req
)),
{
correlationId
:
corr
,
replyTo
:
REPLY_QUEUE
,
persistent
:
false
})
});
});
function
generateUuid
()
{
function
generateUuid
()
{
...
...
lib/amqp/rpcserver.js
View file @
1aeaaaf2
...
@@ -30,7 +30,7 @@ RPCServer.prototype.start = function(cb)
...
@@ -30,7 +30,7 @@ RPCServer.prototype.start = function(cb)
var
req
=
JSON
.
parse
(
msg
.
content
.
toString
());
var
req
=
JSON
.
parse
(
msg
.
content
.
toString
());
self
.
remote_function
(
req
,
function
(
err
,
resp
){
self
.
remote_function
(
req
,
function
(
err
,
resp
){
ch
.
sendToQueue
(
msg
.
properties
.
replyTo
,
new
Buffer
(
JSON
.
stringify
(
resp
)),{
correlationId
:
msg
.
properties
.
correlationId
,
persistent
:
false
});
ch
.
sendToQueue
(
msg
.
properties
.
replyTo
,
Buffer
.
from
(
JSON
.
stringify
(
resp
)),{
correlationId
:
msg
.
properties
.
correlationId
,
persistent
:
false
});
});
});
//ch.ack(msg);
//ch.ack(msg);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment