func NewReceivedMessage(
	isAckable bool,
	delivery amqp.Delivery) *ReceivedMessage {
	return &ReceivedMessage{
		IsAckable:     isAckable,
		Body:          delivery.Body,
		MessageID:     delivery.MessageId,
		ApplicationID: delivery.AppId,
		PublishDate:   JSONUtcTimestampFromTime(delivery.Timestamp),
		Delivery:      delivery,
	}
}
NewReceivedMessage creates a new ReceivedMessage.
package tcr
import (
	"errors"
	"fmt"
	"time"
	"github.com/google/uuid"
	"github.com/streadway/amqp"
)
type PublishReceipt struct {
	LetterID     uuid.UUID
	FailedLetter *Letter
	Success      bool
	Error        error
}
func (not *PublishReceipt) ToString() string {
	if not.Success {
		return fmt.Sprintf("[LetterID: %s] - Publish successful.\r\n", not.LetterID.String())
	}
	return fmt.Sprintf("[LetterID: %s] - Publish failed.\r\nError: %s\r\n", not.LetterID.String(), not.Error.Error())
}
type ReceivedMessage struct {
	IsAckable     bool
	Body          []byte
	MessageID     string  
	ApplicationID string
	PublishDate   string
	Delivery      amqp.Delivery  
}