question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Batching settings is ignored

See original GitHub issue

Hi,

I am running a nodejs-pubsub client on Windows and Linux and finding this bug on both Platform.

The batching parameter of topic.publisher() is ignored when message are published, despite being visibile and correctly set-up when I read from publisher.settings.batching.

I tried to set the maxMessages parameter to 1 but my messages are still published in batches.

I tried to set BatchSettings(max_messages=1) with Python (with the same subscribers) and it worked.

Environment details

  • OS: Ubuntu 17.10 , 64 bits
  • Node.js version: 6.11.4
  • npm version: 3.5.2
  • google-cloud/pubsub version: 0.16.4

Steps to reproduce

const PubSub = require('@google-cloud/pubsub');

const pubsub = new PubSub({});

const topic = pubsub.topic('mytopic');

const publisher = topic.publisher({
  batching: {
    maxMessages: 1
  }
})

const callback = function (err, messageId) {
  if (err) {
    console.log(err)
  }
};

for (var i = 1; i <= 3; i++) {
  publisher.publish(Buffer.from('This is a message'), { myattribute: 'attributeValue'}, callback);
} // These messages will be sent in a batch rather than as 3 independant messages

Thanks for your help!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Etendard7commented, Feb 22, 2018

Ok thanks! I have reported the issue on the github of the python library. FYI : https://github.com/GoogleCloudPlatform/google-cloud-python/issues/4912

0reactions
callmehiphopcommented, Mar 2, 2018

@Etendard7 I’m going to close this issue. Moving forward Node is going to adopt Python’s strategy for flow control. Thanks again for bringing this to our attention!

Read more comments on GitHub >

github_iconTop Results From Across the Web

2 in batch file is ignored on execution in command prompt
I have a test.bat file that renames images. It looks like this: Timeout 3 Copy "C:\first%20second.png" "C:\sub\first% ...
Read more >
Keras seem to ignore my batch_size and tries to fit all data in ...
No, keras is not ignoring your batch size. You're trying to create numpy arrays with too large dimensions. 'inputsB': np.array(n_input2) ...
Read more >
Processing Options and Settings (Analysis Services)
Some processing settings are primarily used for batch processing jobs. ... Other settings are Ignore error and Report and stop.
Read more >
Update set batching - Product Documentation | ServiceNow
Punctuation and capital letters are ignored. Special characters like underscores (_) are removed. Known synonyms are applied.
Read more >
Batch Processing with Seldon Core
If data type is specified as raw then each row in the input file will be sent to model as it is. In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found