Client SDKsGoReference
Types & Errors
Shared message helpers, responses, and errors — KubeMQ Go SDK reference.
The Go SDK models messages as structs with fluent setters, exposes typed poll/command/query responses, and surfaces transport failures as *KubeMQError with stable error codes.
Common message types
| Type | Role |
|---|---|
Event / EventStore | Pub/sub payloads |
QueueMessage | Durable queue payload + Policy |
Command / Query | RPC requests |
CommandReply / QueryReply | RPC responses |
Factory helpers (NewQueueMessage, NewCommand, etc.) pre-fill client ID where applicable.
Response types
| Type | Returned from |
|---|---|
QueueSendResult | SendQueueMessage, upstream batch results |
PollResponse | PollQueue, downstream Poll |
CommandResponse / QueryResponse | SendCommand, SendQuery |
EventStoreResult | SendEventStore |
Error model
KubeMQError implements error and exposes the Code and IsRetryable fields plus transport metadata.
| Code | Retryable | Typical cause |
|---|---|---|
ErrCodeTimeout | Yes | Deadline exceeded |
ErrCodeTransient | Yes | Network drop or server busy / backpressure |
ErrCodeAuthentication | No | Invalid token |
ErrCodeValidation | No | Invalid channel or message |
Note: Subscription callbacks should not block; offload heavy work to worker goroutines to avoid stalling the gRPC stream.
Resources
See Also
Was this page helpful?