Skip to content

Commit 8efea28

Browse files
committed
for some reason we should publish directly to REQUEST queue of moleculer(nodejs) services
1 parent ddf0d2a commit 8efea28

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

moleculer/consumer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ def request(self, channel, basic_deliver, properties, body):
5656
'ver': '2',
5757
'sender': self.node_id,
5858
'id': request_id,
59-
'success': True
59+
'success': True,
60+
'data': {'result': 'Response from python node'}
6061
}
6162
sender_exchange = 'MOL.RES.{node_id}'.format(node_id=sender)
62-
channel.basic_publish(sender_exchange, '', json.dumps(response_packet))
63+
channel.basic_publish('', sender_exchange, json.dumps(response_packet))
6364

6465
def disconnect(self, channel, basic_deliver, properties, body):
6566
pass

0 commit comments

Comments
 (0)