Actual
DefaultPayload.create(BytBuf data, ByteBuf metadata) leaves given ByteBufs unreleased which differs from the behavior of ByteBufPayload which ensures that given content is released when ByteBufPayload is released
Expected
DefaultPayload.create(BytBuf data, ByteBuf metadata) releases the given ByteBufs so a user should not take care of that.
The source of such expectation can be found there -> https://github.com/rsocket-routing/rsocket-routing-broker/blob/master/rsocket-routing-broker-spring/src/main/java/io/rsocket/routing/broker/spring/cluster/ClusterJoinListener.java#L158
Also, a Payload can be counted as the last handler in the chain of ByteBufs processing and should take care of its releasing
cc/ @spencergibb @rstoyanchev
Actual
DefaultPayload.create(BytBuf data, ByteBuf metadata)leaves givenByteBufs unreleased which differs from the behavior ofByteBufPayloadwhich ensures that given content is released whenByteBufPayloadis releasedExpected
DefaultPayload.create(BytBuf data, ByteBuf metadata)releases the givenByteBufs so a user should not take care of that.The source of such expectation can be found there -> https://github.com/rsocket-routing/rsocket-routing-broker/blob/master/rsocket-routing-broker-spring/src/main/java/io/rsocket/routing/broker/spring/cluster/ClusterJoinListener.java#L158
Also, a
Payloadcan be counted as the last handler in the chain ofByteBufs processing and should take care of its releasingcc/ @spencergibb @rstoyanchev