15 using std::runtime_error::runtime_error;
24 SendException(
const char* what,
bool is_retryable);
27 const bool is_retryable_{
false};
31 static constexpr const char* kWhat{
32 "Message is not delivered after `delivery_timeout` milliseconds. Hint: "
33 "Adjust `delivery_timeout` and `queue_buffering_*` options or manually "
34 "retry the send request."
38 DeliveryTimeoutException();
42 static constexpr const char* kWhat{
43 "The sending queue is full - send request cannot be scheduled. Hint: "
44 "Manually retry the error or increase `queue_buffering_max_messages` "
45 "and/or `queue_buffering_max_kbytes` config option."
53 static constexpr const char* kWhat{
54 "Message size exceeds configured limit. Hint: increase "
55 "`message_max_bytes` config option."
59 MessageTooLargeException();
63 static constexpr const char* kWhat{
"Given topic does not exist in cluster."};
66 UnknownTopicException();
70 static constexpr const char* kWhat =
"Topic does not have given partition.";
73 UnknownPartitionException();
79 using std::runtime_error::runtime_error;
82 OffsetRangeException(std::string_view what, std::string_view topic, std::uint32_t partition);
86 static constexpr const char* kWhat =
"Timeout while fetching offsets.";
89 OffsetRangeTimeoutException(std::string_view topic, std::uint32_t partition);
92class TopicNotFoundException
final :
public std::runtime_error {
94 using std::runtime_error::runtime_error;
100 using std::runtime_error::runtime_error;
103 GetMetadataException(std::string_view what, std::string_view topic);
107 static constexpr const char* kWhat =
"Timeout while getting metadata.";
110 GetMetadataTimeoutException(std::string_view topic);
115class ParseHeadersException
final : std::runtime_error {
116 static constexpr const char* kWhat =
"Failed to parse headers";
119 ParseHeadersException(std::string_view error);
126class SeekException
final :
public std::runtime_error {
128 using std::runtime_error::runtime_error;
135class SeekInvalidArgumentException
final :
public std::invalid_argument {
137 using std::invalid_argument::invalid_argument;