{"modulePath":"github.com/uber/submitqueue","version":"v0.1.0-dev9","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package messagequeue\n\n## Types\n\n```go\ntype Message struct {\n\t// ID uniquely identifies the message for deduplication and tracing.\n\tID string\n\n\t// Payload is the message body as raw bytes.\n\tPayload []byte\n\n\t// Metadata contains key-value pairs for headers and attributes.\n\t// Use for trace IDs, request IDs, and cross-service metadata.\n\tMetadata map[string]string\n\n\t// PartitionKey determines which partition/shard this message goes to.\n\t// Messages with the same PartitionKey are guaranteed ordered delivery.\n\t// Optional - if empty, backend may use round-robin distribution.\n\tPartitionKey string\n\n\t// PublishedAt is when the message was published (Unix milliseconds).\n\tPublishedAt int64\n}\n```\nMessage represents a queue message entity. Immutable - use Copy() for modifications.\n\n```go\nfunc NewMessage(id string, payload []byte, partitionKey string, metadata map[string]string) Message\n```\nNewMessage creates a new message with the given ID, payload, partition key, and metadata. If metadata is nil, it will be initialized as an empty map. PublishedAt is set to the current time.\n\n```go\nfunc (m Message) Copy() Message\n```\nCopy creates a deep copy of the message. Safe to call concurrently.\n\n","path":"github.com/uber/submitqueue/entity/messagequeue","name":"messagequeue","synopsis":"","isRedistributable":true}
