View Source ExRocketmq.Models.Message (lib_oss v0.1.0)

The model of message sent by producer or consumed by consumer

Summary

Types

@type t() :: %ExRocketmq.Models.Message{
  batch: boolean(),
  body: binary(),
  compress: boolean(),
  flag: ExRocketmq.Typespecs.flag(),
  properties: ExRocketmq.Typespecs.properties(),
  queue_id: non_neg_integer(),
  topic: String.t(),
  transaction_id: ExRocketmq.Typespecs.transaction_id()
}

Functions

@spec decode_properties(binary()) :: ExRocketmq.Typespecs.properties()
@spec encode(t()) :: binary()
Link to this function

encode_properties(message)

View Source
@spec encode_properties(t()) :: binary()
Link to this function

get_property(msg, key, default \\ nil)

View Source
@spec get_property(t(), String.t(), String.t() | nil) :: String.t() | nil
Link to this function

with_properties(msg, properties)

View Source
@spec with_properties(t(), ExRocketmq.Typespecs.properties()) :: t()
Link to this function

with_property(msg, key, value)

View Source
@spec with_property(t(), String.t(), String.t()) :: t()