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."};
37 DeliveryTimeoutException();
41 static constexpr const char* kWhat{
42 "The sending queue is full - send request cannot be scheduled. Hint: "
43 "Manually retry the error or increase `queue_buffering_max_messages` "
44 "and/or `queue_buffering_max_kbytes` config option."};
51 static constexpr const char* kWhat{
52 "Message size exceeds configured limit. Hint: increase "
53 "`message_max_bytes` config option."};
56 MessageTooLargeException();
60 static constexpr const char* kWhat{
"Given topic does not exist in cluster."};
63 UnknownTopicException();
67 static constexpr const char* kWhat =
"Topic does not have given partition.";
70 UnknownPartitionException();
76 using std::runtime_error::runtime_error;
79 OffsetRangeException(std::string_view what, std::string_view topic, std::uint32_t partition);
83 static constexpr const char* kWhat =
"Timeout while fetching offsets.";
86 OffsetRangeTimeoutException(std::string_view topic, std::uint32_t partition);
89class TopicNotFoundException
final :
public std::runtime_error {
91 using std::runtime_error::runtime_error;
97 using std::runtime_error::runtime_error;
100 GetMetadataException(std::string_view what, std::string_view topic);
104 static constexpr const char* kWhat =
"Timeout while getting metadata.";
107 GetMetadataTimeoutException(std::string_view topic);
112class ParseHeadersException
final : std::runtime_error {
113 static constexpr const char* kWhat =
"Failed to parse headers";
116 ParseHeadersException(std::string_view error);