1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00
ctrl/event_type.go

29 lines
1,010 B
Go
Raw Normal View History

// NB:
// When adding new constants for the Method or event
// types, make sure to also add them to the map
// <Method/Event>Available since the this will be used
// to check if the message values are valid later on.
package steward
2022-01-27 06:19:04 +00:00
// Event describes on the message level if this is
// an ACK or NACK kind of message in the Subject name.
// This field is mainly used to be able to spawn up different
// worker processes based on the Subject name.
// This type is used in both building the subject name, and
// also inside the Message type to describe what kind like
// ACK or NACK it is.
2022-01-27 06:19:04 +00:00
type Event string
const (
2022-01-27 06:19:04 +00:00
// EventACK, wait for the return of an ACK message.
// The sender will wait for an ACK reply message
// to decide if it was succesfully delivered or not.
// If no ACK was received within the timeout, the
// message will be resent the nr. of times specified
// in retries field of the message.
EventACK Event = "EventACK"
2021-02-17 17:59:49 +00:00
// Same as above, but No ACK.
2022-01-27 06:19:04 +00:00
EventNACK Event = "EventNACK"
)