Deprecate ProducerOptions.setEncoding()

The reason is that values other than BINARY oftentimes cause issues
(see https://github.com/pgpainless/pgpainless/issues/264), and further
experts recommended to ignore the metadata of the LiteralData packet
and only produce with ('b'/0/) as metadata values.
This commit is contained in:
Paul Schaub 2022-03-27 17:34:24 +02:00
parent 1cb3e559b5
commit 620deaa1f9
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 5 additions and 0 deletions

View File

@ -230,7 +230,11 @@ public final class ProducerOptions {
*
* @param encoding encoding
* @return this
*
* @deprecated this option will be removed in the near future, as values other than {@link StreamEncoding#BINARY}
* are causing issues. See https://github.com/pgpainless/pgpainless/issues/264 for details
*/
@Deprecated
public ProducerOptions setEncoding(@Nonnull StreamEncoding encoding) {
this.streamEncoding = encoding;
return this;
@ -239,6 +243,7 @@ public final class ProducerOptions {
public StreamEncoding getEncoding() {
return streamEncoding;
}
/**
* Override which compression algorithm shall be used.
*