[英]Bulk load data in titan db from nodejs
My current scenario is like 我目前的情况是
Now what I am trying to do is load data from rabbit mq into titan db. 现在,我想做的是将Rabbit MQ中的数据加载到titan db中。
What I have been able to do till now is load the data from nodejs file using gremlin node module 到目前为止,我只能使用gremlin节点模块从nodejs文件加载数据
var createClient = require('gremlin').createClient; //import { createClient } from 'gremlin'; const client = createClient(); client.execute('tx=graph.newTransaction();tx.addVertex(T.label,"product","id",991);tx.commit()', {}, function(err, results){ if (err) { return console.error(err) } console.log(results) });
How should I move next so that I can harness existing rabbit mq of orders and push them into titan db. 接下来我应该如何移动,以便可以利用现有的兔子mq订单并将其推入titan db。
Due to some constraints I can not use java.
由于某些限制,我无法使用Java。
You're most likely looking for something like node-amqp , which is a Node.js client for RabbitMQ. 您很可能正在寻找类似node-amqp的东西,这是RabbitMQ的Node.js客户端。 What you want to do is:
您想要做的是:
Things you must watch for that will otherwise likely kill your performance: 您必须注意的事情否则可能会损害您的性能:
.commit()
yourself). .commit()
会话模式下)。 Numbers in the couple thousands should work. I'm not familiar with RabbitMQ but hopefully this should get you started. 我对RabbitMQ不熟悉,但希望这可以帮助您入门。
Note: Gremlin javascript driver interacts with Gremlin Server via a WebSocket connection, which is permanent and bi-directional. 注意:Gremlin javascript驱动程序通过WebSocket连接与Gremlin Server交互,该连接是永久的和双向的。 The client doesn't support the HTTP Channelizer yet (which is not the kind of connection that you wish to establish in the current scenario).
客户端尚不支持HTTP Channelizer(这不是您希望在当前方案中建立的连接)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.