pulsar-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sijie Guo <guosi...@gmail.com>
Subject Re: impl of the producer and consumer
Date Mon, 17 Dec 2018 13:39:03 GMT
I think the question was answered at the slack channel.

Copied the conversation here for reference:

```
zero.xu [9:13 AM]
@merlimat @sijieg after read the code carefully, I found the clue:
PersistentTopic.publishMessage -> ManagedLedgerImpl.asyncAddEntry ->
OpAddEntry.initiate -> LedgerHandle.asyncAddEntry ->
OpAddEntry.addComplete+safeRun -> ManagedLedgerImpl.notifyCursors ->
ManagedCursorImpl.notifyEntriesAvailable ->
ManagedLedgerImpl.asyncReadEntries -> EntryCacheImpl.asyncReadEntry
```

On Sun, Dec 16, 2018 at 10:34 PM 徐建海 <zero.xu@bytedance.com> wrote:

> Hi, users & dev:
>     after read the code, I found the msg will be add async inot ledger
> in PersistentTopic impl, but how the consumer know the new msg coming? I
> can't find any code about this, ashamed about my terrible ability. but
> in NonPersistentTopic impl, the msg just go through subscriptions->
> subscription -> dispatcher-> consumer->channel. who call show me the
> related code in PersistentTopic?
>

Mime
View raw message