Skip to content

Commit

Permalink
chore: adjust pulling log format (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
gxcsoccer committed May 10, 2019
1 parent 10638b9 commit 92892df
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions lib/consumer/mq_push_consumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,18 @@ class MQPushConsumer extends ClientConfig {
commitOffset = offset;
}
}

this.logger.info('[MQPushConsumer] start to pull message from queue: %s, nextOffset: %s, commitOffset: %s, subExpression: %s, subVersion: %s',
messageQueue.key, pullRequest.nextOffset, commitOffset, subExpression, subVersion);
const pullResult = await this.pullKernelImpl(messageQueue, subExpression, subVersion, pullRequest.nextOffset, commitOffset);
this.updatePullFromWhichNode(messageQueue, pullResult.suggestWhichBrokerId);
const originOffset = pullRequest.nextOffset;
// update next pull offset
pullRequest.nextOffset = pullResult.nextBeginOffset;

this.logger.info('[MQPushConsumer] pull message result: %s from queue: %s, requestOffset: %s, nextBeginOffset: %s, minOffset: %s, maxOffset: %s, suggestWhichBrokerId: %s',
pullResult.pullStatus, messageQueue.key, originOffset, pullResult.nextBeginOffset, pullResult.minOffset, pullResult.maxOffset, pullResult.suggestWhichBrokerId);

switch (pullResult.pullStatus) {
case PullStatus.FOUND:
{
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"homepage": "https://github.com/ali-sdk/ali-ons#readme",
"dependencies": {
"JSON2": "^0.1.0",
"address": "^1.0.3",
"address": "^1.1.0",
"binary-search-insert": "^1.0.3",
"byte": "^2.0.0",
"bytes": "^3.1.0",
Expand All @@ -44,18 +44,18 @@
"mz-modules": "^2.1.0",
"osenv": "^0.1.5",
"p-gather": "^1.0.2",
"sdk-base": "^3.5.1",
"sdk-base": "^3.6.0",
"tcp-base": "^3.1.0",
"utility": "^1.16.1"
},
"devDependencies": {
"autod": "^3.1.0",
"contributors": "^0.5.1",
"egg-bin": "^4.12.3",
"egg-bin": "^4.13.0",
"eslint": "^5.16.0",
"eslint-config-egg": "^7.3.1",
"eslint-config-egg": "^7.4.1",
"mm": "^2.5.0",
"urllib": "^2.33.3"
"urllib": "^2.34.0"
},
"engines": {
"node": ">= 8.0.0"
Expand Down
2 changes: 1 addition & 1 deletion test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ describe('test/index.test.js', () => {
await consumer.close();
});

it('should receive message with specified time', async () => {
it.skip('should receive message with specified time', async () => {
const delayTime = 10000;

const body = 'hello delay message at ' + Date.now();
Expand Down

0 comments on commit 92892df

Please sign in to comment.