apache / apache/pulsar-client-go

Messages not appearing in the output channel

Open
#297 5 comments 0 reactions 0 assignees View on GitHub
triage/week-26
Dominant language
Go
Stars
745
Forks
389
Avg merge
3d 20h
Merged PRs (30d)
3

Description

#### Expected behavior

```
reader, errorCreatingReader := client.CreateReader(pulsar.ReaderOptions{
Topic: createTopicString(namespace, topic),
StartMessageID: pulsar.LatestMessageID(),
MessageChannel: messageChannel,
ReceiverQueueSize: 10,
})
```
In this scenario, `messageChannel` gets messages in the channel whenever they arrive from the broker.
#### Actual behavior
Messages do not appear in the channel.
Note that, if I issue reader.Next(), instead of setting MessageChannel, messages do appear in the channel.

Contributor guide

Open the contributing guide

Research direction

Start at client.CreateReader and trace how ReaderOptions.MessageChannel is handled, comparing that path with reader.Next(), which is reported to deliver messages. Reproduce the example with StartMessageID, MessageChannel, and ReceiverQueueSize 10, then verify that arriving broker messages appear on messageChannel without calling reader.Next().

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.