Skip to content

Commit 0867cd2

Browse files
committed
Replaced Cassandra-uuid with uuid
Bug: T223690
1 parent eb4568b commit 0867cd2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/KafkaSSE.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const kafka = require('node-rdkafka');
44
const P = require('bluebird');
55
const bunyan = require('bunyan');
66
const _ = require('lodash');
7-
const TimeUuid = require('cassandra-uuid').TimeUuid;
7+
const uuid = require('uuid');
88
const EventEmitter = require('events');
99

1010
const SSEResponse = require('./SSEResponse');
@@ -105,7 +105,7 @@ class KafkaSSE {
105105
this.req = req;
106106
this.res = res;
107107
// Use x-request-id if it is set, otherwise create a new uuid.
108-
this.id = this.req.headers['x-request-id'] || TimeUuid.now().toString();
108+
this.id = this.req.headers['x-request-id'] || uuid();
109109

110110
// Will be set to true for any call to this.disconnect().
111111
// This will be used to prevent consume loop from

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
"dependencies": {
3939
"bluebird": "^3.5.1",
4040
"bunyan": "^1.8.1",
41-
"cassandra-uuid": "^0.0.2",
4241
"lodash": "^4.15.0",
4342
"node-rdkafka": "^2.3.4",
44-
"safe-regex": "^1.1.0"
43+
"safe-regex": "^1.1.0",
44+
"uuid": "^3.3.2"
4545
},
4646
"devDependencies": {
4747
"istanbul": "^0.4.4",

0 commit comments

Comments
 (0)