Settings

sealed abstract
class Settings[F[_], E]
Companion
object
class Object
trait Matchable
class Any

Value members

Abstract methods

It will automatically unsubscribe from a topic whenever the consumer is closed.

It will automatically unsubscribe from a topic whenever the consumer is closed.

By default, this is turned off, as unsubscribing from a topic means deleting the subscription.

This could be undesirable most of the time, specially when using Exclusive or Failover subscription modes. Note that unsubscribing from a Shared subscription will always fail when multiple consumers are connected.

def withDeadLetterPolicy(policy: DeadLetterPolicy): Settings[F, E]

Set dead letter policy for consumer.

Set dead letter policy for consumer.

By default some message will redelivery so many times possible, even to the extent that it can be never stop. By using dead letter mechanism messages will has the max redelivery count, when message exceeding the maximum number of redeliveries, message will send to the Dead Letter Topic and acknowledged automatic.

def withInitialPosition(_initial: SubscriptionInitialPosition): Settings[F, E]

The Subscription Initial Position. Latest by default.

The Subscription Initial Position. Latest by default.

def withLogger(_logger: E => URL => F[Unit]): Settings[F, E]

The logger action that runs on every message consumed. It does nothing by default.

The logger action that runs on every message consumed. It does nothing by default.

If enabled, the consumer will read messages from the compacted topic rather than reading the full message backlog of the topic. This means that, if the topic has been compacted, the consumer will only see the latest value for each key in the topic, up until the point in the topic message backlog that has been compacted. Beyond that point, the messages will be sent as normal.

If enabled, the consumer will read messages from the compacted topic rather than reading the full message backlog of the topic. This means that, if the topic has been compacted, the consumer will only see the latest value for each key in the topic, up until the point in the topic message backlog that has been compacted. Beyond that point, the messages will be sent as normal.

readCompacted can only be enabled subscriptions to persistent topics, which have a single active consumer (i.e. failure or exclusive subscriptions). Attempting to enable it on subscriptions to a non-persistent topics or on a shared subscription, will lead to the subscription call throwing a PulsarClientException.

Abstract fields

val autoUnsubscribe: Boolean
val deadLetterPolicy: Option[DeadLetterPolicy]
val decodingErrorHandler: Throwable => F[OnFailure]
val initial: SubscriptionInitialPosition
val logger: E => URL => F[Unit]
val messageDecoder: Option[Array[Byte] => F[E]]
val readCompacted: Boolean
val schema: Option[Schema[E]]