Class: Prosody::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/prosody/native_stubs.rb,
sig/prosody.rbs

Overview

Represents a Kafka message with its metadata and payload. Provides access to message properties like topic, partition, offset, and content.

Instance Method Summary collapse

Instance Method Details

#keyString

Returns the message key used for partitioning.

Returns:

  • (String)

    The message key



297
298
299
# File 'lib/prosody/native_stubs.rb', line 297

def key
  raise NotImplementedError, "This method is implemented natively in Rust"
end

#offsetInteger

Returns the Kafka offset of this message within its partition.

Returns:

  • (Integer)

    The message offset



290
291
292
# File 'lib/prosody/native_stubs.rb', line 290

def offset
  raise NotImplementedError, "This method is implemented natively in Rust"
end

#partitionInteger

Returns the Kafka partition number for this message.

Returns:

  • (Integer)

    The partition number



283
284
285
# File 'lib/prosody/native_stubs.rb', line 283

def partition
  raise NotImplementedError, "This method is implemented natively in Rust"
end

#payloadPayload

Returns the deserialized message payload.

Returns:

  • (Payload)

    The message content



313
314
315
# File 'lib/prosody/native_stubs.rb', line 313

def payload
  raise NotImplementedError, "This method is implemented natively in Rust"
end

#timestampTime

Returns the timestamp when the message was created.

Returns:

  • (Time)

    The message timestamp



304
305
306
# File 'lib/prosody/native_stubs.rb', line 304

def timestamp
  raise NotImplementedError, "This method is implemented natively in Rust"
end

#topicString

Returns the Kafka topic this message was published to.

Returns:

  • (String)

    The topic name



276
277
278
# File 'lib/prosody/native_stubs.rb', line 276

def topic
  raise NotImplementedError, "This method is implemented natively in Rust"
end