apache / apache/pulsar-client-node
Issue with version 1.10 and onwards on windows
- Lenguaje dominante
- C++
- Estrellas
- 164
- Forks
- 98
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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();
})();
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza ejecutando el ejemplo del README en Windows con AuthenticationOauth2 y compara las versiones 1.9, 1.10 y 1.11. Concéntrate en la llamada a createProducer y en el AuthenticationError reportado; se considera terminado cuando se haya identificado por qué falla la autenticación en las versiones afectadas y se haya confirmado que la creación del productor funciona con el comportamiento corregido.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, node.js
- Área
- api, backend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100