kafka.message

Message

class Message extends AnyRef

A message. The format of an N byte message is the following:

1. 4 byte CRC32 of the message 2. 1 byte "magic" identifier to allow format changes, value is 2 currently 3. 1 byte "attributes" identifier to allow annotations on the message independent of the version (e.g. compression enabled, type of codec used) 4. 4 byte key length, containing length K 5. K byte key 6. 4 byte payload length, containing length V 7. V byte payload

Default constructor wraps an existing ByteBuffer with the Message object with no change to the contents.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Message
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Message(bytes: Array[Byte])

  2. new Message(bytes: Array[Byte], key: Array[Byte])

  3. new Message(bytes: Array[Byte], codec: CompressionCodec)

  4. new Message(bytes: Array[Byte], key: Array[Byte], codec: CompressionCodec)

  5. new Message(bytes: Array[Byte], key: Array[Byte], codec: CompressionCodec, payloadOffset: Int, payloadSize: Int)

    A constructor to create a Message

    A constructor to create a Message

    bytes

    The payload of the message

    key

    The key of the message (null, if none)

    payloadOffset

    The offset into the payload array used to extract payload

    payloadSize

    The size of the payload to use

  6. new Message(buffer: ByteBuffer)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def attributes: Byte

    The attributes stored with this message

  8. val buffer: ByteBuffer

  9. def checksum: Long

    Retrieve the previously computed CRC for this message

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def compressionCodec: CompressionCodec

    The compression codec used with this message

  12. def computeChecksum(): Long

    Compute the checksum of the message from the message contents

  13. def ensureValid(): Unit

    Throw an InvalidMessageException if isValid is false for this message

  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(any: Any): Boolean

    Definition Classes
    Message → AnyRef → Any
  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. def hasKey: Boolean

    Does the message have a key?

  19. def hashCode(): Int

    Definition Classes
    Message → AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. def isNull(): Boolean

    Is the payload of this message null

  22. def isValid: Boolean

    Returns true if the crc stored with the message matches the crc computed off the message contents

  23. def key: ByteBuffer

    A ByteBuffer containing the message key

  24. def keySize: Int

    The length of the key in bytes

  25. def magic: Byte

    The magic version of this message

  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def payload: ByteBuffer

    A ByteBuffer containing the content of the message

  30. def payloadSize: Int

    The length of the message value in bytes

  31. def size: Int

    The complete serialized size of this message in bytes (including crc, header attributes, etc)

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. def toString(): String

    Definition Classes
    Message → AnyRef → Any
  34. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped