apache / apache/pulsar-client-node

Issue with version 1.10 and onwards on windows

Đang mở
#381 2 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
164
Fork
98
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi!
I'm building an application using pulsar and everything works fine on the latest version on macos. After some trial and error on my windows pc. it seems there is an issue with version 1.10 and 1.11 on windows. if i change the version to 1.9 it works again.

I used slightly modified version of the example from readme to test this. Only difference is i added authentication, so it might just be a problem with that.

I get this error:
```
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^

[Error: Failed to create producer: AuthenticationError]
```

Full code example:
```
const Pulsar = require('pulsar-client');

const DEV_DEFAULTS = {
serviceUrl: "SECRET",
type: "client_credentials",
issuer_url: "SECRET",
audience: "SECRET",
scope: "SECRET",
};
const clientConfig = {
name: "SECRET",
clientId: "SECRET",
clientSecret: "SECRET",
};
(async () => {
// Create a client
const client = new Pulsar.Client({
serviceUrl: DEV_DEFAULTS.serviceUrl,
authentication: new Pulsar.AuthenticationOauth2({
...DEV_DEFAULTS,
client_id: clientConfig.clientId,
client_secret: clientConfig.clientSecret,
})
});

// Create a producer
const producer = await client.createProducer({
topic: 'SECRET',
});

// Create a consumer
const consumer = await client.subscribe({
topic: 'SECRET',
subscription: 'SECRET'
});

// Send a message
producer.send({
data: Buffer.from("hello")
});

// Receive the message
const msg = await consumer.receive();
console.log(msg.getData().toString());
consumer.acknowledge(msg);

await producer.close();
await consumer.close();
await client.close();
})();
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Trước tiên, hãy chạy ví dụ trong README trên Windows với AuthenticationOauth2 và so sánh các phiên bản 1.9, 1.10 và 1.11. Tập trung vào lời gọi createProducer và AuthenticationError được báo cáo; hoàn thành có nghĩa là xác định lý do xác thực không thành công trên các phiên bản bị ảnh hưởng và xác nhận rằng việc tạo producer hoạt động với hành vi đã được sửa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, node.js
Lĩnh vực
api, backend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.