[−][src]Function pulsar_sys::pulsar_client_create_reader
pub unsafe extern "C" fn pulsar_client_create_reader(
client: *mut pulsar_client_t,
topic: *const c_char,
startMessageId: *const pulsar_message_id_t,
conf: *mut pulsar_reader_configuration_t,
reader: *mut *mut pulsar_reader_t
) -> pulsar_result
Create a topic reader with given {@code ReaderConfiguration} for reading messages from the specified topic.
The Reader provides a low-level abstraction that allows for manual positioning in the topic, without using a subscription. Reader can only work on non-partitioned topics.
The initial reader positioning is done by specifying a message id. The options are:
MessageId.earliest
: Start reading from the earliest message available in the topicMessageId.latest
: Start reading from the end topic, only getting messages published after the reader was createdMessageId
: When passing a particular message id, the reader will position itself on that specific position. The first message to be read will be the message next to the specified messageId.
@param topic The name of the topic where to read @param startMessageId The message id where the reader will position itself. The first message returned will be the one after the specified startMessageId @param conf The {@code ReaderConfiguration} object @return The {@code Reader} object