Open zbentley opened 1 year ago
You're right. This API was introduced in https://github.com/apache/pulsar/pull/6331, at that moment the Pulsar community is not as active as it is currently, no PIP and discussion was required for such a new API. This API is really bad designed.
I just need to know how to parse the data.
Unfortunately, it needs much code work. We need to implement the same logic with https://github.com/apache/pulsar/blob/4678c36d4023a2bb8361e0a70673b96de33f06ac/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java#L1237
and
In the short term, I suggest creating a reader and seek to a specific position that is specified by (ledger id, entry id, batch index)
instead of depending on this admin API if you're using non-Java clients.
The issue had no activity for 30 days, mark with Stale label.
Search before asking
Version
2.10.3
Minimal reproduce step
abc123
to a persistent topic with a non-batched (batchingEnabled=false
) producer.GET admin/v2/persistent/{tenant}/{namespace}/{topic}/ledger/{ledgerId}/entry/{entryId}
functionality.abc123
.batchingEnabled=true
.abc123
.What did you expect to see?
Something I can use to extract individual messages from a batch. That could include any of the below ideas, or something totally different:
PulsarApi.proto
against the batch data and nothing added up, so I suspect this is something internal, but may be wrong.What did you see instead?
An undocumented blob of binary (I think this is a raw chunk of message data from the ledger) that looks like it contains some info re: properties/etc. up front, and then concatenated message+metadata entries for each message in the batch.
Anything else?
Many of my proposed fixes break backwards compatibility, so this may be better suited as a feature request.
However, in the short term, I'd love to find a reference on how to extract individual messages from the batch in a non-Java environment. I control all my admin API accesses in my environment, so I can add parsing logic to those wrappers--I just need to know how to parse the data.
Are you willing to submit a PR?