[][src]Function pulsar_sys::pulsar_consumer_configuration_set_consumer_type

pub unsafe extern "C" fn pulsar_consumer_configuration_set_consumer_type(
    consumer_configuration: *mut pulsar_consumer_configuration_t,
    consumerType: pulsar_consumer_type
)

Specify the consumer type. The consumer type enables specifying the type of subscription. In Exclusive subscription, only a single consumer is allowed to attach to the subscription. Other consumers will get an error message. In Shared subscription, multiple consumers will be able to use the same subscription name and the messages will be dispatched in a round robin fashion. In Failover subscription, a primary-failover subscription model allows for multiple consumers to attach to a single subscription, though only one of them will be “master” at a given time. Only the primary consumer will receive messages. When the primary consumer gets disconnected, one among the failover consumers will be promoted to primary and will start getting messages.