Exception: KubeMQ::StreamBrokenError
- Defined in:
- lib/kubemq/errors.rb
Overview
Note:
This error is retryable. Create a new sender or receiver after receiving this error.
Raised when a gRPC bidirectional stream breaks unexpectedly.
For queue upstream/downstream streams, the unacked_message_ids field
lists messages that may not have been acknowledged before the break.
Subscription streams auto-reconnect; sender/receiver streams must be
recreated manually.
Instance Attribute Summary collapse
-
#unacked_message_ids ⇒ Array<String>
readonly
Message IDs that were in-flight when the stream broke.
Attributes inherited from Error
#channel, #code, #details, #operation, #request_id, #suggestion
Instance Method Summary collapse
-
#initialize(message, unacked_message_ids: nil, **kwargs) ⇒ StreamBrokenError
constructor
A new instance of StreamBrokenError.
Methods inherited from Error
Constructor Details
#initialize(message, unacked_message_ids: nil, **kwargs) ⇒ StreamBrokenError
Returns a new instance of StreamBrokenError.
234 235 236 237 238 239 |
# File 'lib/kubemq/errors.rb', line 234 def initialize(, unacked_message_ids: nil, **kwargs) kwargs[:code] ||= ErrorCode::STREAM_BROKEN kwargs[:retryable] = true unless kwargs.key?(:retryable) super(, **kwargs) = || [] end |
Instance Attribute Details
#unacked_message_ids ⇒ Array<String> (readonly)
Returns message IDs that were in-flight when the stream broke.
229 230 231 |
# File 'lib/kubemq/errors.rb', line 229 def end |