Settings

dev.profunktor.pulsar.Producer$.Settings
See theSettings companion object
sealed abstract class Settings[F[_], E]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

def withBatching(_batching: Batching): Settings[F, E]
def withDeduplication(seqIdMaker: SeqIdMaker[F, E]): Settings[F, E]

Enables deduplication with a custom message SequenceId maker.

Enables deduplication with a custom message SequenceId maker.

Remember to enable deduplication on the broker too.

See: https://pulsar.apache.org/docs/en/cookbooks-deduplication/

Example:

val maker = SeqIdMaker.instance[IO, String](
  (lastSeqId, msg) => IO.pure(lastSeqId + 1)
)

Producer.Settings[IO, String]().withDeduplication(maker)

Attributes

Enables deduplication using the default Pulsar SequenceId maker.

Enables deduplication using the default Pulsar SequenceId maker.

Remember to enable deduplication on the broker too.

See: https://pulsar.apache.org/docs/en/cookbooks-deduplication/

Attributes

def withLogger(_logger: E => URL => F[Unit]): Settings[F, E]
def withMessageKey(_msgKey: E => MessageKey): Settings[F, E]
def withName(_name: String): Settings[F, E]
def withShardKey(_shardKey: E => ShardKey): Settings[F, E]
def withUnsafeConf(f: ProducerBuilder[Any] => ProducerBuilder[Any]): Settings[F, E]

USE THIS ONE WITH CAUTION!

USE THIS ONE WITH CAUTION!

In case Neutron does not yet support what you're looking for, there is a big chance the underlying Java client does.

In this case, you can access the underlying ProducerBuilder to customize it. E.g.

Settings[F, E]().withUnsafeConf(_.autoUpdatePartitions(true))

To be used with extreme caution!

Attributes

Abstract fields

val logger: E => URL => F[Unit]
val schema: Option[Schema[E]]
val shardKey: E => ShardKey
val unsafeOps: ProducerBuilder[Any] => ProducerBuilder[Any]