Exception: KubeMQ::BufferFullError
- Defined in:
- lib/kubemq/errors.rb
Overview
Raised when the reconnect message buffer reaches capacity.
During disconnection, outbound messages are buffered. When the buffer is full, the oldest message is dropped. Not retryable — wait for the connection to recover or increase the buffer size.
Instance Attribute Summary collapse
-
#buffer_size ⇒ Integer
readonly
Current buffer size when the error occurred.
Attributes inherited from Error
#channel, #code, #details, #operation, #request_id, #suggestion
Instance Method Summary collapse
-
#initialize(message, buffer_size: 0, **kwargs) ⇒ BufferFullError
constructor
A new instance of BufferFullError.
Methods inherited from Error
Constructor Details
#initialize(message, buffer_size: 0, **kwargs) ⇒ BufferFullError
Returns a new instance of BufferFullError.
256 257 258 259 260 261 |
# File 'lib/kubemq/errors.rb', line 256 def initialize(, buffer_size: 0, **kwargs) kwargs[:code] = ErrorCode::BUFFER_FULL kwargs[:retryable] = false unless kwargs.key?(:retryable) super(, **kwargs) @buffer_size = buffer_size end |
Instance Attribute Details
#buffer_size ⇒ Integer (readonly)
Returns current buffer size when the error occurred.
251 252 253 |
# File 'lib/kubemq/errors.rb', line 251 def buffer_size @buffer_size end |