Skip to content

MetaDataUpdate ends up with unhandledRejection #242

@spirin22

Description

@spirin22

First of all, I want to thank you for the amazing work on this project! I have an issue and would appreciate your opinion.

My setup:

RabbitMQ: 3.11.20 (cluster with 3 nodes behind k8s service, unfortunately can't upgrade it yet)
rabbitmq-stream-js-client: 0.6.0
Node.js: 22.13.1

I often observe metadata_update in my staging environment with code 0x06 (Stream not available). Unfortunately, I don't know the reason yet, and looking at logs didn't help me to understand it. My rabbitmq nodes don't have any errors or reloads at the moment of metadata_update and write only these info logs related to the stream I receive the metadata_update for:

info rabbitmq-main-server-2 Stream: test-stream-2_1739894330824592080 will use /bitnami/rabbitmq/mnesia/rabbit@rabbitmq-main-server-2.rabbitmq-main-nodes.rabbitmq/stream/test-stream-2_1739894330824592080 for osiris log data directory

info rabbitmq-main-server-2 test-stream-2_1739894330824592080 [osiris_replica:handle_continue/2] osiris replica starting in epoch 3, next offset 8624, tail info {8624,{2,8623,1741903053199}}

info rabbitmq-main-server-1 test-stream-2_1739894330824592080: starting osiris replica reader at offset 8624

info rabbitmq-main-server-2 rabbit_stream_coordinator: test-stream-2_1739894330824592080: replica started on rabbit@rabbitmq-main-server-2.rabbitmq-main-nodes.rabbitmq in 3 pid <0.2410.11>

This is followed by consumer close and therabbitmq-stream-js-client calls Connection.closeConsumer(consumer.extendedId). The request gets an unsuccessful response and the lib throws code 4 - Subscription ID does not exist error. That rejection of closeConsumer promise ends up unhandled as the lib doesn't handle it and doesn't expose any way to handle it on my side.

I would like to contribute and add an error event to listeners if you support this. Also, I would really appreciate any guidance on how to debug the issue I have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions