Example #1
0
// QueueDiscardMsgByKey discard a message (delete without bouncing) by his id
func QueueDiscardMsg(id int64) error {
	m, err := core.QueueGetMessageById(id)
	if err != nil {
		return err
	}
	return m.Discard()
}
Example #2
0
// QueueBounceMsgByKey bounce a message by his key
func QueueBounceMsg(id int64) error {
	m, err := core.QueueGetMessageById(id)
	if err != nil {
		return err
	}
	return m.Bounce()
}
Example #3
0
// QueueGetMessage return a message by its id
func QueueGetMessage(id int64) (core.QMessage, error) {
	return core.QueueGetMessageById(id)
}