BewareMyPower commented on issue #12087:
URL: https://github.com/apache/pulsar/issues/12087#issuecomment-922900220
> `Payload convert(MessageContext message, Payload payload)`
>
> with
>
> ```
> interface MessageContext {
> ... getMetadata(....)
> }
> ```
>
> and a high level wrapper
>
> ```
> interface Payload {
> int size()
> getInputStream()
> copyTo(....)
> static Payload wrap(byte[])
> static Payload wrap(ByteBuffer....)
> ...add whatever is needed...
> }
> ```
Good suggestion. I'll think about some proper interfaces for it.
> second topic:
> the client must be able to auto detect the "format" of the payload and
then apply it automatically to the messages tagged with that format, the only
constraint is that in the classpath you have the proper "MessageConverter"
If I didn't understand wrong, I think it's a part of converter's
implementation. In the previous PIP, I used two methods, one of them is for
detecting the format. In this PIP, I merged them into one because the format
detection is usually simple. See
https://github.com/apache/pulsar/pull/12088/files#diff-f1e742e597b262e9da738239c878d0a0f3429f4484bc9461cb6a6f838c6a138a
as an example.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]