You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
var EventHubClient = require('azure-event-hubs').Client;
var client = EventHubClient.fromConnectionString('Endpoint=sb://my-servicebus-namespace.servicebus.windows.net/;SharedAccessKeyName=my-SA-name;SharedAccessKey=my-SA-key', 'myeventhub')
client.open()
.then(function() {
client.createSender();
})
.then(function (tx) {
tx.on('errorReceived', function (err) { console.log(err); });
tx.send({ contents: 'Here is some text sent to partition key my-pk.' }, 'my-pk');
});
Btw, createSender v1 does not work properly, you can input whatever num in postion 'my-pk', and this function will send the message to a random partition.
I put '200' in the second param postion, and it just sended my message to partition 1.
CreateSender v2 is ok.
Sorry for my bad grammar.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue. We have a new preview version "0.1.0" of the event hubs client. This client was re-written from scratch. Please try the new version and let us know if you still see issues. You can find examples over here.
https://github.com/Azure/azure-event-hubs-node/blob/3be0b729312e506720e323bdc94172d341fb128e/send_receive/README.md#example-3---create-a-sender-v1
it should be
Btw, createSender v1 does not work properly, you can input whatever num in postion 'my-pk', and this function will send the message to a random partition.
I put '200' in the second param postion, and it just sended my message to partition 1.
CreateSender v2 is ok.
Sorry for my bad grammar.
The text was updated successfully, but these errors were encountered: