--- title: "Consuming messages" description: "Consuming messages — Go BabelQueue SDK (1.x)." source: https://babelqueue.com/docs/babelqueue-go/1.x/consuming-messages/ updated: 2026-06-06T00:00:00.000Z --- # Consuming messages Pull the bytes from your broker, `Decode` them, gate with `Accepts`, then switch on the URN — regardless of which language produced the message. `TraceID` carries the cross-service correlation id. ```go import babelqueue "github.com/babelqueue/babelqueue-go" // body pulled from your broker (Redis BLPOP, AMQP delivery, …) in, err := babelqueue.Decode(body) if err != nil || !in.Accepts() { return // malformed or unsupported — dead-letter / drop } switch in.URN() { case "urn:babel:orders:created": log.Printf("[%s] order received: %+v", in.TraceID, in.Data) } ``` That's the whole loop: any producer, any consumer, one schema.