Skip to content

Commit 4e7edb7

Browse files
committed
228
1 parent f480b66 commit 4e7edb7

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

OpenFlow/src/Messages/Message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ export class Message {
560560
containers: [
561561
{
562562
name: 'nodered',
563-
image: 'cloudhack/openflownodered:0.0.227',
563+
image: 'cloudhack/openflownodered:0.0.228',
564564
imagePullPolicy: "Always",
565565
env: [
566566
{ name: "saml_federation_metadata", value: Config.saml_federation_metadata },

OpenFlowNodeRED/src/nodered/nodes/amqp_nodes.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ export class amqp_consumer_node {
6060
if (!NoderedUtil.IsNullEmpty(username) && !NoderedUtil.IsNullEmpty(password)) {
6161
this.host = "amqp://" + username + ":" + password + "@" + this.host;
6262
} else {
63+
if (!NoderedUtil.IsNullUndefinded(Config.queue_prefix)) {
64+
if (NoderedUtil.IsNullUndefinded(_config) || NoderedUtil.IsNullEmpty(_config.username)) {
65+
this.config.queue = Config.queue_prefix + this.config.queue;
66+
}
67+
}
6368
// this.host = "amqp://" + this.host;
6469
this.host = Config.amqp_url;
6570
}
@@ -83,8 +88,12 @@ export class amqp_consumer_node {
8388
try {
8489
var result: any = {};
8590
result.amqpacknowledgment = ack;
91+
var data: any = null;
92+
try {
93+
data = JSON.parse(msg.content.toString());
94+
} catch (error) {
8695

87-
var data = JSON.parse(msg.content.toString());
96+
}
8897
try {
8998
data.payload = JSON.parse(data.payload);
9099
} catch (error) {
@@ -145,6 +154,13 @@ export class amqp_publisher_node {
145154
// this.host = "amqp://" + this.host;
146155
this.host = Config.amqp_url;
147156
}
157+
if (!NoderedUtil.IsNullUndefinded(Config.queue_prefix)) {
158+
if (NoderedUtil.IsNullUndefinded(_config) || NoderedUtil.IsNullEmpty(_config.username)) {
159+
this.config.queue = Config.queue_prefix + this.config.queue;
160+
this.config.localqueue = Config.queue_prefix + this.config.localqueue;
161+
}
162+
}
163+
148164
this.connect();
149165
} catch (error) {
150166
NoderedUtil.HandleError(this, error);

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.227
1+
0.0.228

0 commit comments

Comments
 (0)