{"modulePath":"github.com/uber/submitqueue","version":"v0.2.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package messagequeue\n\nPackage messagequeue holds Stovepipe's internal message-queue contract: the wire payloads for the pipeline queues Stovepipe owns, defined by the proto files in proto/ and generated into protopb/. The proto is the language-neutral authority; the generated Go types in protopb are the binding for Go callers.\n\nIt is internal — used only within the Stovepipe domain — so it lives under stovepipe/core rather than api/. The message types are generated into protopb; this package adds only generic protojson glue (Marshal/Unmarshal) and the topic-key reflection lookup (TopicKeys), so there is no per-message serialization code. Payloads are serialized as protobuf JSON, not binary, so the MySQL-backed queue keeps storing self-describing JSON. The topic key that carries each payload is declared on the message itself via the topic\\_keys proto option (see api/base/messagequeue).\n\n## Functions\n\n```go\nfunc Marshal(m proto.Message) ([]byte, error)\n```\nMarshal serializes any contract message to protojson bytes for the queue payload, keeping the proto field names (snake\\_case) on the wire.\n\n```go\nfunc TopicKeys(m proto.Message) []string\n```\nTopicKeys returns the stable logical topic keys bound to a message via the topic\\_keys proto option — not concrete wire names; a caller maps each key to its backend's topic name. Returns nil for a message that declares no keys.\n\n```go\nfunc Unmarshal[T proto.Message](b []byte, m T) error\n```\nUnmarshal deserializes protojson bytes into the contract message m, tolerating unknown fields so an additive contract change is ignored rather than rejected.\n\n## Types\n\n```go\ntype ProcessRequest = protopb.ProcessRequest\n```\nProcessRequest is the payload ingest publishes to the process stage: the minted request id to validate.\n\n```go\ntype TopicKey = consumer.TopicKey\n```\nTopicKey is the typed identifier used to look up a queue backend, topic name, and subscription config in a consumer.TopicRegistry. The constants below are the logical topic keys for Stovepipe's internal pipeline stages; they are the same strings each message lists in its topic\\_keys option.\n\n```go\nconst (\n\t// TopicKeyProcess carries newly accepted requests from ingest to the process\n\t// stage. ingest publishes a ProcessRequest (the request id) here; the process\n\t// controller consumes it, reloads the Request, and decides the build strategy.\n\tTopicKeyProcess TopicKey = \"process\"\n)\n```\n\n","path":"github.com/uber/submitqueue/stovepipe/core/messagequeue","name":"messagequeue","synopsis":"Package messagequeue holds Stovepipe's internal message-queue contract: the wire payloads for the pipeline queues Stovepipe owns, defined by the proto files in proto/ and generated into protopb/.","isRedistributable":true}
