Documentation ¶
Index ¶
Constants ¶
View Source
const Exceeds_Max_Message_Count_Err errors.ErrorCode = "Exceeds_Max_Message_Count_Err"
View Source
const MAX_ACK_COUNT = 2000
MAX_ACK_COUNT is maximum number of messages which can be acknowledged.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventReader ¶
type EventReader interface { // ReadOne reads one message from persistent subscription. // Reads will block one the buffer size for persistent subscription is reached. // Buffer size is specified when we are connecting to a persistent subscription. ReadOne() (persistent_event.ReadResponseEvent, errors.Error) // this call must block // Ack sends Ack signal for a message. // Maximum of 2000 messages can be acknowledged at once. Ack(msgs ...persistent_event.ReadResponseEvent) errors.Error // Nack sends Nack signal for a message. // Client must also specify a reason why message was nack-ed. Nack(reason string, action persistent_action.Nack_Action, msgs ...persistent_event.ReadResponseEvent) error // Close closes the connection to a persistent subscription. Close() }
EventReader provides a reader for a persistent subscription. Clients must acknowledge (or not acknowledge) messages in the competing consumer model. If you enable auto-ack the subscription will automatically acknowledge messages once your handler completes them.
func NewEventReader ¶
func NewEventReader( client persistent.PersistentSubscriptions_ReadClient, subscriptionId string, messageAdapter message_adapter.MessageAdapter, cancel context.CancelFunc, ) EventReader
NewEventReader creates a new event reader
Click to show internal directories.
Click to hide internal directories.