[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-encore-encore-pubsub":3,"mdc-mjgcj9-key":37,"related-repo-encore-encore-pubsub":1523,"related-org-encore-encore-pubsub":1625},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":32,"sourceUrl":35,"mdContent":36},"encore-pubsub","implement pub\u002Fsub messaging in Encore.ts","Asynchronous messaging in Encore.ts via `Topic` and `Subscription` from `encore.dev\u002Fpubsub` — broadcast events, decouple producers from consumers, and run background handlers.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"encore","Encore","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fencore.png","encoredev",[13,17,20,21],{"name":14,"slug":15,"type":16},"Backend","backend","tag",{"name":18,"slug":19,"type":16},"TypeScript","typescript",{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},"Messaging","messaging",26,"https:\u002F\u002Fgithub.com\u002Fencoredev\u002Fskills","2026-05-16T05:59:59.436238",null,5,[30,31],"claude-code","skills",{"repoUrl":25,"stars":24,"forks":28,"topics":33,"description":34},[30,31],"Agent Skills for development with Encore.","https:\u002F\u002Fgithub.com\u002Fencoredev\u002Fskills\u002Ftree\u002FHEAD\u002Fencore\u002Fpubsub","---\nname: encore-pubsub\ndescription: Asynchronous messaging in Encore.ts via `Topic` and `Subscription` from `encore.dev\u002Fpubsub` — broadcast events, decouple producers from consumers, and run background handlers.\nwhen_to_use: >-\n  User wants to publish\u002Fbroadcast events, fan out a single event to many handlers, fire-and-forget messages between services, react to something asynchronously, set up a worker that consumes events, configure delivery guarantees (at-least-once, exactly-once), or use ordering attributes. Trigger phrases: \"publish an event\", \"broadcast\", \"subscribe to\", \"topic\", \"Pub\u002FSub\", \"pubsub\", \"event bus\", \"order_created event\", \"send to anyone listening\", \"background event handler\", \"queue\", \"fan out\".\n---\n\n# Encore Pub\u002FSub\n\n## Instructions\n\nPub\u002FSub is for asynchronous messaging between services. Producers publish events to a `Topic`; consumers attach `Subscription`s to react. Resources must be declared at package level — never inside functions.\n\n## Topics\n\n```typescript\nimport { Topic } from \"encore.dev\u002Fpubsub\";\n\ninterface OrderCreatedEvent {\n  orderId: string;\n  userId: string;\n  total: number;\n}\n\n\u002F\u002F Package level declaration\nexport const orderCreated = new Topic\u003COrderCreatedEvent>(\"order-created\", {\n  deliveryGuarantee: \"at-least-once\",\n});\n```\n\n### Publishing\n\n```typescript\nawait orderCreated.publish({\n  orderId: \"123\",\n  userId: \"user-456\",\n  total: 99.99,\n});\n```\n\n### Subscriptions\n\n```typescript\nimport { Subscription } from \"encore.dev\u002Fpubsub\";\n\nconst _ = new Subscription(orderCreated, \"send-confirmation-email\", {\n  handler: async (event) => {\n    await sendEmail(event.userId, event.orderId);\n  },\n});\n```\n\n### Message Attributes\n\nUse `Attribute\u003CT>` for fields that should be treated as message attributes (for filtering\u002Fordering):\n\n```typescript\nimport { Topic, Attribute } from \"encore.dev\u002Fpubsub\";\n\ninterface CartEvent {\n  cartId: Attribute\u003Cstring>;  \u002F\u002F Used for ordering\n  userId: string;\n  action: \"add\" | \"remove\";\n  productId: string;\n}\n\n\u002F\u002F Ordered topic: events with same cartId delivered in order\nexport const cartEvents = new Topic\u003CCartEvent>(\"cart-events\", {\n  deliveryGuarantee: \"at-least-once\",\n  orderingAttribute: \"cartId\",\n});\n```\n\n### Topic References\n\nPass topic access to other code while maintaining static analysis:\n\n```typescript\nimport { Publisher } from \"encore.dev\u002Fpubsub\";\n\nconst publisherRef = orderCreated.ref\u003CPublisher>();\n\nasync function notifyOrder(ref: typeof publisherRef, orderId: string) {\n  await ref.publish({ orderId, userId: \"123\", total: 99.99 });\n}\n```\n\n## Delivery Guarantees\n\n- `at-least-once` (default): may deliver duplicates → handlers must be idempotent.\n- `exactly-once`: stricter, capped throughput (AWS 300 msg\u002Fs\u002Ftopic, GCP 3000+ msg\u002Fs\u002Fregion). Does not deduplicate on the publish side.\n\n## Guidelines\n\n- Topics and subscriptions must be declared at package level.\n- Subscription handlers must be idempotent (at-least-once delivery is the default).\n- Use `Attribute\u003CT>` for fields meant for filtering\u002Fordering, not for arbitrary metadata.\n- Don't do heavy synchronous work in `publish` callers — `publish` returns once the message is queued.\n",{"data":38,"body":40},{"name":4,"description":6,"when_to_use":39},"User wants to publish\u002Fbroadcast events, fan out a single event to many handlers, fire-and-forget messages between services, react to something asynchronously, set up a worker that consumes events, configure delivery guarantees (at-least-once, exactly-once), or use ordering attributes. Trigger phrases: \"publish an event\", \"broadcast\", \"subscribe to\", \"topic\", \"Pub\u002FSub\", \"pubsub\", \"event bus\", \"order_created event\", \"send to anyone listening\", \"background event handler\", \"queue\", \"fan out\".",{"type":41,"children":42},"root",[43,51,58,81,87,401,408,539,545,774,780,793,1153,1159,1164,1436,1442,1468,1474,1517],{"type":44,"tag":45,"props":46,"children":47},"element","h1",{"id":4},[48],{"type":49,"value":50},"text","Encore Pub\u002FSub",{"type":44,"tag":52,"props":53,"children":55},"h2",{"id":54},"instructions",[56],{"type":49,"value":57},"Instructions",{"type":44,"tag":59,"props":60,"children":61},"p",{},[62,64,71,73,79],{"type":49,"value":63},"Pub\u002FSub is for asynchronous messaging between services. Producers publish events to a ",{"type":44,"tag":65,"props":66,"children":68},"code",{"className":67},[],[69],{"type":49,"value":70},"Topic",{"type":49,"value":72},"; consumers attach ",{"type":44,"tag":65,"props":74,"children":76},{"className":75},[],[77],{"type":49,"value":78},"Subscription",{"type":49,"value":80},"s to react. Resources must be declared at package level — never inside functions.",{"type":44,"tag":52,"props":82,"children":84},{"id":83},"topics",[85],{"type":49,"value":86},"Topics",{"type":44,"tag":88,"props":89,"children":93},"pre",{"className":90,"code":91,"language":19,"meta":92,"style":92},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { Topic } from \"encore.dev\u002Fpubsub\";\n\ninterface OrderCreatedEvent {\n  orderId: string;\n  userId: string;\n  total: number;\n}\n\n\u002F\u002F Package level declaration\nexport const orderCreated = new Topic\u003COrderCreatedEvent>(\"order-created\", {\n  deliveryGuarantee: \"at-least-once\",\n});\n","",[94],{"type":44,"tag":65,"props":95,"children":96},{"__ignoreMap":92},[97,152,162,183,207,227,249,258,266,276,352,383],{"type":44,"tag":98,"props":99,"children":102},"span",{"class":100,"line":101},"line",1,[103,109,115,121,126,131,136,142,147],{"type":44,"tag":98,"props":104,"children":106},{"style":105},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[107],{"type":49,"value":108},"import",{"type":44,"tag":98,"props":110,"children":112},{"style":111},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[113],{"type":49,"value":114}," {",{"type":44,"tag":98,"props":116,"children":118},{"style":117},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[119],{"type":49,"value":120}," Topic",{"type":44,"tag":98,"props":122,"children":123},{"style":111},[124],{"type":49,"value":125}," }",{"type":44,"tag":98,"props":127,"children":128},{"style":105},[129],{"type":49,"value":130}," from",{"type":44,"tag":98,"props":132,"children":133},{"style":111},[134],{"type":49,"value":135}," \"",{"type":44,"tag":98,"props":137,"children":139},{"style":138},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[140],{"type":49,"value":141},"encore.dev\u002Fpubsub",{"type":44,"tag":98,"props":143,"children":144},{"style":111},[145],{"type":49,"value":146},"\"",{"type":44,"tag":98,"props":148,"children":149},{"style":111},[150],{"type":49,"value":151},";\n",{"type":44,"tag":98,"props":153,"children":155},{"class":100,"line":154},2,[156],{"type":44,"tag":98,"props":157,"children":159},{"emptyLinePlaceholder":158},true,[160],{"type":49,"value":161},"\n",{"type":44,"tag":98,"props":163,"children":165},{"class":100,"line":164},3,[166,172,178],{"type":44,"tag":98,"props":167,"children":169},{"style":168},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[170],{"type":49,"value":171},"interface",{"type":44,"tag":98,"props":173,"children":175},{"style":174},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[176],{"type":49,"value":177}," OrderCreatedEvent",{"type":44,"tag":98,"props":179,"children":180},{"style":111},[181],{"type":49,"value":182}," {\n",{"type":44,"tag":98,"props":184,"children":186},{"class":100,"line":185},4,[187,193,198,203],{"type":44,"tag":98,"props":188,"children":190},{"style":189},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[191],{"type":49,"value":192},"  orderId",{"type":44,"tag":98,"props":194,"children":195},{"style":111},[196],{"type":49,"value":197},":",{"type":44,"tag":98,"props":199,"children":200},{"style":174},[201],{"type":49,"value":202}," string",{"type":44,"tag":98,"props":204,"children":205},{"style":111},[206],{"type":49,"value":151},{"type":44,"tag":98,"props":208,"children":209},{"class":100,"line":28},[210,215,219,223],{"type":44,"tag":98,"props":211,"children":212},{"style":189},[213],{"type":49,"value":214},"  userId",{"type":44,"tag":98,"props":216,"children":217},{"style":111},[218],{"type":49,"value":197},{"type":44,"tag":98,"props":220,"children":221},{"style":174},[222],{"type":49,"value":202},{"type":44,"tag":98,"props":224,"children":225},{"style":111},[226],{"type":49,"value":151},{"type":44,"tag":98,"props":228,"children":230},{"class":100,"line":229},6,[231,236,240,245],{"type":44,"tag":98,"props":232,"children":233},{"style":189},[234],{"type":49,"value":235},"  total",{"type":44,"tag":98,"props":237,"children":238},{"style":111},[239],{"type":49,"value":197},{"type":44,"tag":98,"props":241,"children":242},{"style":174},[243],{"type":49,"value":244}," number",{"type":44,"tag":98,"props":246,"children":247},{"style":111},[248],{"type":49,"value":151},{"type":44,"tag":98,"props":250,"children":252},{"class":100,"line":251},7,[253],{"type":44,"tag":98,"props":254,"children":255},{"style":111},[256],{"type":49,"value":257},"}\n",{"type":44,"tag":98,"props":259,"children":261},{"class":100,"line":260},8,[262],{"type":44,"tag":98,"props":263,"children":264},{"emptyLinePlaceholder":158},[265],{"type":49,"value":161},{"type":44,"tag":98,"props":267,"children":269},{"class":100,"line":268},9,[270],{"type":44,"tag":98,"props":271,"children":273},{"style":272},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[274],{"type":49,"value":275},"\u002F\u002F Package level declaration\n",{"type":44,"tag":98,"props":277,"children":279},{"class":100,"line":278},10,[280,285,290,295,300,305,310,315,320,325,330,334,339,343,348],{"type":44,"tag":98,"props":281,"children":282},{"style":105},[283],{"type":49,"value":284},"export",{"type":44,"tag":98,"props":286,"children":287},{"style":168},[288],{"type":49,"value":289}," const",{"type":44,"tag":98,"props":291,"children":292},{"style":117},[293],{"type":49,"value":294}," orderCreated ",{"type":44,"tag":98,"props":296,"children":297},{"style":111},[298],{"type":49,"value":299},"=",{"type":44,"tag":98,"props":301,"children":302},{"style":111},[303],{"type":49,"value":304}," new",{"type":44,"tag":98,"props":306,"children":308},{"style":307},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[309],{"type":49,"value":120},{"type":44,"tag":98,"props":311,"children":312},{"style":111},[313],{"type":49,"value":314},"\u003C",{"type":44,"tag":98,"props":316,"children":317},{"style":174},[318],{"type":49,"value":319},"OrderCreatedEvent",{"type":44,"tag":98,"props":321,"children":322},{"style":111},[323],{"type":49,"value":324},">",{"type":44,"tag":98,"props":326,"children":327},{"style":117},[328],{"type":49,"value":329},"(",{"type":44,"tag":98,"props":331,"children":332},{"style":111},[333],{"type":49,"value":146},{"type":44,"tag":98,"props":335,"children":336},{"style":138},[337],{"type":49,"value":338},"order-created",{"type":44,"tag":98,"props":340,"children":341},{"style":111},[342],{"type":49,"value":146},{"type":44,"tag":98,"props":344,"children":345},{"style":111},[346],{"type":49,"value":347},",",{"type":44,"tag":98,"props":349,"children":350},{"style":111},[351],{"type":49,"value":182},{"type":44,"tag":98,"props":353,"children":355},{"class":100,"line":354},11,[356,361,365,369,374,378],{"type":44,"tag":98,"props":357,"children":358},{"style":189},[359],{"type":49,"value":360},"  deliveryGuarantee",{"type":44,"tag":98,"props":362,"children":363},{"style":111},[364],{"type":49,"value":197},{"type":44,"tag":98,"props":366,"children":367},{"style":111},[368],{"type":49,"value":135},{"type":44,"tag":98,"props":370,"children":371},{"style":138},[372],{"type":49,"value":373},"at-least-once",{"type":44,"tag":98,"props":375,"children":376},{"style":111},[377],{"type":49,"value":146},{"type":44,"tag":98,"props":379,"children":380},{"style":111},[381],{"type":49,"value":382},",\n",{"type":44,"tag":98,"props":384,"children":386},{"class":100,"line":385},12,[387,392,397],{"type":44,"tag":98,"props":388,"children":389},{"style":111},[390],{"type":49,"value":391},"}",{"type":44,"tag":98,"props":393,"children":394},{"style":117},[395],{"type":49,"value":396},")",{"type":44,"tag":98,"props":398,"children":399},{"style":111},[400],{"type":49,"value":151},{"type":44,"tag":402,"props":403,"children":405},"h3",{"id":404},"publishing",[406],{"type":49,"value":407},"Publishing",{"type":44,"tag":88,"props":409,"children":411},{"className":90,"code":410,"language":19,"meta":92,"style":92},"await orderCreated.publish({\n  orderId: \"123\",\n  userId: \"user-456\",\n  total: 99.99,\n});\n",[412],{"type":44,"tag":65,"props":413,"children":414},{"__ignoreMap":92},[415,447,475,503,524],{"type":44,"tag":98,"props":416,"children":417},{"class":100,"line":101},[418,423,428,433,438,442],{"type":44,"tag":98,"props":419,"children":420},{"style":105},[421],{"type":49,"value":422},"await",{"type":44,"tag":98,"props":424,"children":425},{"style":117},[426],{"type":49,"value":427}," orderCreated",{"type":44,"tag":98,"props":429,"children":430},{"style":111},[431],{"type":49,"value":432},".",{"type":44,"tag":98,"props":434,"children":435},{"style":307},[436],{"type":49,"value":437},"publish",{"type":44,"tag":98,"props":439,"children":440},{"style":117},[441],{"type":49,"value":329},{"type":44,"tag":98,"props":443,"children":444},{"style":111},[445],{"type":49,"value":446},"{\n",{"type":44,"tag":98,"props":448,"children":449},{"class":100,"line":154},[450,454,458,462,467,471],{"type":44,"tag":98,"props":451,"children":452},{"style":189},[453],{"type":49,"value":192},{"type":44,"tag":98,"props":455,"children":456},{"style":111},[457],{"type":49,"value":197},{"type":44,"tag":98,"props":459,"children":460},{"style":111},[461],{"type":49,"value":135},{"type":44,"tag":98,"props":463,"children":464},{"style":138},[465],{"type":49,"value":466},"123",{"type":44,"tag":98,"props":468,"children":469},{"style":111},[470],{"type":49,"value":146},{"type":44,"tag":98,"props":472,"children":473},{"style":111},[474],{"type":49,"value":382},{"type":44,"tag":98,"props":476,"children":477},{"class":100,"line":164},[478,482,486,490,495,499],{"type":44,"tag":98,"props":479,"children":480},{"style":189},[481],{"type":49,"value":214},{"type":44,"tag":98,"props":483,"children":484},{"style":111},[485],{"type":49,"value":197},{"type":44,"tag":98,"props":487,"children":488},{"style":111},[489],{"type":49,"value":135},{"type":44,"tag":98,"props":491,"children":492},{"style":138},[493],{"type":49,"value":494},"user-456",{"type":44,"tag":98,"props":496,"children":497},{"style":111},[498],{"type":49,"value":146},{"type":44,"tag":98,"props":500,"children":501},{"style":111},[502],{"type":49,"value":382},{"type":44,"tag":98,"props":504,"children":505},{"class":100,"line":185},[506,510,514,520],{"type":44,"tag":98,"props":507,"children":508},{"style":189},[509],{"type":49,"value":235},{"type":44,"tag":98,"props":511,"children":512},{"style":111},[513],{"type":49,"value":197},{"type":44,"tag":98,"props":515,"children":517},{"style":516},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[518],{"type":49,"value":519}," 99.99",{"type":44,"tag":98,"props":521,"children":522},{"style":111},[523],{"type":49,"value":382},{"type":44,"tag":98,"props":525,"children":526},{"class":100,"line":28},[527,531,535],{"type":44,"tag":98,"props":528,"children":529},{"style":111},[530],{"type":49,"value":391},{"type":44,"tag":98,"props":532,"children":533},{"style":117},[534],{"type":49,"value":396},{"type":44,"tag":98,"props":536,"children":537},{"style":111},[538],{"type":49,"value":151},{"type":44,"tag":402,"props":540,"children":542},{"id":541},"subscriptions",[543],{"type":49,"value":544},"Subscriptions",{"type":44,"tag":88,"props":546,"children":548},{"className":90,"code":547,"language":19,"meta":92,"style":92},"import { Subscription } from \"encore.dev\u002Fpubsub\";\n\nconst _ = new Subscription(orderCreated, \"send-confirmation-email\", {\n  handler: async (event) => {\n    await sendEmail(event.userId, event.orderId);\n  },\n});\n",[549],{"type":44,"tag":65,"props":550,"children":551},{"__ignoreMap":92},[552,592,599,654,695,751,759],{"type":44,"tag":98,"props":553,"children":554},{"class":100,"line":101},[555,559,563,568,572,576,580,584,588],{"type":44,"tag":98,"props":556,"children":557},{"style":105},[558],{"type":49,"value":108},{"type":44,"tag":98,"props":560,"children":561},{"style":111},[562],{"type":49,"value":114},{"type":44,"tag":98,"props":564,"children":565},{"style":117},[566],{"type":49,"value":567}," Subscription",{"type":44,"tag":98,"props":569,"children":570},{"style":111},[571],{"type":49,"value":125},{"type":44,"tag":98,"props":573,"children":574},{"style":105},[575],{"type":49,"value":130},{"type":44,"tag":98,"props":577,"children":578},{"style":111},[579],{"type":49,"value":135},{"type":44,"tag":98,"props":581,"children":582},{"style":138},[583],{"type":49,"value":141},{"type":44,"tag":98,"props":585,"children":586},{"style":111},[587],{"type":49,"value":146},{"type":44,"tag":98,"props":589,"children":590},{"style":111},[591],{"type":49,"value":151},{"type":44,"tag":98,"props":593,"children":594},{"class":100,"line":154},[595],{"type":44,"tag":98,"props":596,"children":597},{"emptyLinePlaceholder":158},[598],{"type":49,"value":161},{"type":44,"tag":98,"props":600,"children":601},{"class":100,"line":164},[602,607,612,616,620,624,629,633,637,642,646,650],{"type":44,"tag":98,"props":603,"children":604},{"style":168},[605],{"type":49,"value":606},"const",{"type":44,"tag":98,"props":608,"children":609},{"style":117},[610],{"type":49,"value":611}," _ ",{"type":44,"tag":98,"props":613,"children":614},{"style":111},[615],{"type":49,"value":299},{"type":44,"tag":98,"props":617,"children":618},{"style":111},[619],{"type":49,"value":304},{"type":44,"tag":98,"props":621,"children":622},{"style":307},[623],{"type":49,"value":567},{"type":44,"tag":98,"props":625,"children":626},{"style":117},[627],{"type":49,"value":628},"(orderCreated",{"type":44,"tag":98,"props":630,"children":631},{"style":111},[632],{"type":49,"value":347},{"type":44,"tag":98,"props":634,"children":635},{"style":111},[636],{"type":49,"value":135},{"type":44,"tag":98,"props":638,"children":639},{"style":138},[640],{"type":49,"value":641},"send-confirmation-email",{"type":44,"tag":98,"props":643,"children":644},{"style":111},[645],{"type":49,"value":146},{"type":44,"tag":98,"props":647,"children":648},{"style":111},[649],{"type":49,"value":347},{"type":44,"tag":98,"props":651,"children":652},{"style":111},[653],{"type":49,"value":182},{"type":44,"tag":98,"props":655,"children":656},{"class":100,"line":185},[657,662,666,671,676,682,686,691],{"type":44,"tag":98,"props":658,"children":659},{"style":307},[660],{"type":49,"value":661},"  handler",{"type":44,"tag":98,"props":663,"children":664},{"style":111},[665],{"type":49,"value":197},{"type":44,"tag":98,"props":667,"children":668},{"style":168},[669],{"type":49,"value":670}," async",{"type":44,"tag":98,"props":672,"children":673},{"style":111},[674],{"type":49,"value":675}," (",{"type":44,"tag":98,"props":677,"children":679},{"style":678},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[680],{"type":49,"value":681},"event",{"type":44,"tag":98,"props":683,"children":684},{"style":111},[685],{"type":49,"value":396},{"type":44,"tag":98,"props":687,"children":688},{"style":168},[689],{"type":49,"value":690}," =>",{"type":44,"tag":98,"props":692,"children":693},{"style":111},[694],{"type":49,"value":182},{"type":44,"tag":98,"props":696,"children":697},{"class":100,"line":28},[698,703,708,712,716,720,725,729,734,738,743,747],{"type":44,"tag":98,"props":699,"children":700},{"style":105},[701],{"type":49,"value":702},"    await",{"type":44,"tag":98,"props":704,"children":705},{"style":307},[706],{"type":49,"value":707}," sendEmail",{"type":44,"tag":98,"props":709,"children":710},{"style":189},[711],{"type":49,"value":329},{"type":44,"tag":98,"props":713,"children":714},{"style":117},[715],{"type":49,"value":681},{"type":44,"tag":98,"props":717,"children":718},{"style":111},[719],{"type":49,"value":432},{"type":44,"tag":98,"props":721,"children":722},{"style":117},[723],{"type":49,"value":724},"userId",{"type":44,"tag":98,"props":726,"children":727},{"style":111},[728],{"type":49,"value":347},{"type":44,"tag":98,"props":730,"children":731},{"style":117},[732],{"type":49,"value":733}," event",{"type":44,"tag":98,"props":735,"children":736},{"style":111},[737],{"type":49,"value":432},{"type":44,"tag":98,"props":739,"children":740},{"style":117},[741],{"type":49,"value":742},"orderId",{"type":44,"tag":98,"props":744,"children":745},{"style":189},[746],{"type":49,"value":396},{"type":44,"tag":98,"props":748,"children":749},{"style":111},[750],{"type":49,"value":151},{"type":44,"tag":98,"props":752,"children":753},{"class":100,"line":229},[754],{"type":44,"tag":98,"props":755,"children":756},{"style":111},[757],{"type":49,"value":758},"  },\n",{"type":44,"tag":98,"props":760,"children":761},{"class":100,"line":251},[762,766,770],{"type":44,"tag":98,"props":763,"children":764},{"style":111},[765],{"type":49,"value":391},{"type":44,"tag":98,"props":767,"children":768},{"style":117},[769],{"type":49,"value":396},{"type":44,"tag":98,"props":771,"children":772},{"style":111},[773],{"type":49,"value":151},{"type":44,"tag":402,"props":775,"children":777},{"id":776},"message-attributes",[778],{"type":49,"value":779},"Message Attributes",{"type":44,"tag":59,"props":781,"children":782},{},[783,785,791],{"type":49,"value":784},"Use ",{"type":44,"tag":65,"props":786,"children":788},{"className":787},[],[789],{"type":49,"value":790},"Attribute\u003CT>",{"type":49,"value":792}," for fields that should be treated as message attributes (for filtering\u002Fordering):",{"type":44,"tag":88,"props":794,"children":796},{"className":90,"code":795,"language":19,"meta":92,"style":92},"import { Topic, Attribute } from \"encore.dev\u002Fpubsub\";\n\ninterface CartEvent {\n  cartId: Attribute\u003Cstring>;  \u002F\u002F Used for ordering\n  userId: string;\n  action: \"add\" | \"remove\";\n  productId: string;\n}\n\n\u002F\u002F Ordered topic: events with same cartId delivered in order\nexport const cartEvents = new Topic\u003CCartEvent>(\"cart-events\", {\n  deliveryGuarantee: \"at-least-once\",\n  orderingAttribute: \"cartId\",\n});\n",[797],{"type":44,"tag":65,"props":798,"children":799},{"__ignoreMap":92},[800,848,855,871,906,925,972,992,999,1006,1014,1080,1107,1137],{"type":44,"tag":98,"props":801,"children":802},{"class":100,"line":101},[803,807,811,815,819,824,828,832,836,840,844],{"type":44,"tag":98,"props":804,"children":805},{"style":105},[806],{"type":49,"value":108},{"type":44,"tag":98,"props":808,"children":809},{"style":111},[810],{"type":49,"value":114},{"type":44,"tag":98,"props":812,"children":813},{"style":117},[814],{"type":49,"value":120},{"type":44,"tag":98,"props":816,"children":817},{"style":111},[818],{"type":49,"value":347},{"type":44,"tag":98,"props":820,"children":821},{"style":117},[822],{"type":49,"value":823}," Attribute",{"type":44,"tag":98,"props":825,"children":826},{"style":111},[827],{"type":49,"value":125},{"type":44,"tag":98,"props":829,"children":830},{"style":105},[831],{"type":49,"value":130},{"type":44,"tag":98,"props":833,"children":834},{"style":111},[835],{"type":49,"value":135},{"type":44,"tag":98,"props":837,"children":838},{"style":138},[839],{"type":49,"value":141},{"type":44,"tag":98,"props":841,"children":842},{"style":111},[843],{"type":49,"value":146},{"type":44,"tag":98,"props":845,"children":846},{"style":111},[847],{"type":49,"value":151},{"type":44,"tag":98,"props":849,"children":850},{"class":100,"line":154},[851],{"type":44,"tag":98,"props":852,"children":853},{"emptyLinePlaceholder":158},[854],{"type":49,"value":161},{"type":44,"tag":98,"props":856,"children":857},{"class":100,"line":164},[858,862,867],{"type":44,"tag":98,"props":859,"children":860},{"style":168},[861],{"type":49,"value":171},{"type":44,"tag":98,"props":863,"children":864},{"style":174},[865],{"type":49,"value":866}," CartEvent",{"type":44,"tag":98,"props":868,"children":869},{"style":111},[870],{"type":49,"value":182},{"type":44,"tag":98,"props":872,"children":873},{"class":100,"line":185},[874,879,883,887,891,896,901],{"type":44,"tag":98,"props":875,"children":876},{"style":189},[877],{"type":49,"value":878},"  cartId",{"type":44,"tag":98,"props":880,"children":881},{"style":111},[882],{"type":49,"value":197},{"type":44,"tag":98,"props":884,"children":885},{"style":174},[886],{"type":49,"value":823},{"type":44,"tag":98,"props":888,"children":889},{"style":111},[890],{"type":49,"value":314},{"type":44,"tag":98,"props":892,"children":893},{"style":174},[894],{"type":49,"value":895},"string",{"type":44,"tag":98,"props":897,"children":898},{"style":111},[899],{"type":49,"value":900},">;",{"type":44,"tag":98,"props":902,"children":903},{"style":272},[904],{"type":49,"value":905},"  \u002F\u002F Used for ordering\n",{"type":44,"tag":98,"props":907,"children":908},{"class":100,"line":28},[909,913,917,921],{"type":44,"tag":98,"props":910,"children":911},{"style":189},[912],{"type":49,"value":214},{"type":44,"tag":98,"props":914,"children":915},{"style":111},[916],{"type":49,"value":197},{"type":44,"tag":98,"props":918,"children":919},{"style":174},[920],{"type":49,"value":202},{"type":44,"tag":98,"props":922,"children":923},{"style":111},[924],{"type":49,"value":151},{"type":44,"tag":98,"props":926,"children":927},{"class":100,"line":229},[928,933,937,941,946,950,955,959,964,968],{"type":44,"tag":98,"props":929,"children":930},{"style":189},[931],{"type":49,"value":932},"  action",{"type":44,"tag":98,"props":934,"children":935},{"style":111},[936],{"type":49,"value":197},{"type":44,"tag":98,"props":938,"children":939},{"style":111},[940],{"type":49,"value":135},{"type":44,"tag":98,"props":942,"children":943},{"style":138},[944],{"type":49,"value":945},"add",{"type":44,"tag":98,"props":947,"children":948},{"style":111},[949],{"type":49,"value":146},{"type":44,"tag":98,"props":951,"children":952},{"style":111},[953],{"type":49,"value":954}," |",{"type":44,"tag":98,"props":956,"children":957},{"style":111},[958],{"type":49,"value":135},{"type":44,"tag":98,"props":960,"children":961},{"style":138},[962],{"type":49,"value":963},"remove",{"type":44,"tag":98,"props":965,"children":966},{"style":111},[967],{"type":49,"value":146},{"type":44,"tag":98,"props":969,"children":970},{"style":111},[971],{"type":49,"value":151},{"type":44,"tag":98,"props":973,"children":974},{"class":100,"line":251},[975,980,984,988],{"type":44,"tag":98,"props":976,"children":977},{"style":189},[978],{"type":49,"value":979},"  productId",{"type":44,"tag":98,"props":981,"children":982},{"style":111},[983],{"type":49,"value":197},{"type":44,"tag":98,"props":985,"children":986},{"style":174},[987],{"type":49,"value":202},{"type":44,"tag":98,"props":989,"children":990},{"style":111},[991],{"type":49,"value":151},{"type":44,"tag":98,"props":993,"children":994},{"class":100,"line":260},[995],{"type":44,"tag":98,"props":996,"children":997},{"style":111},[998],{"type":49,"value":257},{"type":44,"tag":98,"props":1000,"children":1001},{"class":100,"line":268},[1002],{"type":44,"tag":98,"props":1003,"children":1004},{"emptyLinePlaceholder":158},[1005],{"type":49,"value":161},{"type":44,"tag":98,"props":1007,"children":1008},{"class":100,"line":278},[1009],{"type":44,"tag":98,"props":1010,"children":1011},{"style":272},[1012],{"type":49,"value":1013},"\u002F\u002F Ordered topic: events with same cartId delivered in order\n",{"type":44,"tag":98,"props":1015,"children":1016},{"class":100,"line":354},[1017,1021,1025,1030,1034,1038,1042,1046,1051,1055,1059,1063,1068,1072,1076],{"type":44,"tag":98,"props":1018,"children":1019},{"style":105},[1020],{"type":49,"value":284},{"type":44,"tag":98,"props":1022,"children":1023},{"style":168},[1024],{"type":49,"value":289},{"type":44,"tag":98,"props":1026,"children":1027},{"style":117},[1028],{"type":49,"value":1029}," cartEvents ",{"type":44,"tag":98,"props":1031,"children":1032},{"style":111},[1033],{"type":49,"value":299},{"type":44,"tag":98,"props":1035,"children":1036},{"style":111},[1037],{"type":49,"value":304},{"type":44,"tag":98,"props":1039,"children":1040},{"style":307},[1041],{"type":49,"value":120},{"type":44,"tag":98,"props":1043,"children":1044},{"style":111},[1045],{"type":49,"value":314},{"type":44,"tag":98,"props":1047,"children":1048},{"style":174},[1049],{"type":49,"value":1050},"CartEvent",{"type":44,"tag":98,"props":1052,"children":1053},{"style":111},[1054],{"type":49,"value":324},{"type":44,"tag":98,"props":1056,"children":1057},{"style":117},[1058],{"type":49,"value":329},{"type":44,"tag":98,"props":1060,"children":1061},{"style":111},[1062],{"type":49,"value":146},{"type":44,"tag":98,"props":1064,"children":1065},{"style":138},[1066],{"type":49,"value":1067},"cart-events",{"type":44,"tag":98,"props":1069,"children":1070},{"style":111},[1071],{"type":49,"value":146},{"type":44,"tag":98,"props":1073,"children":1074},{"style":111},[1075],{"type":49,"value":347},{"type":44,"tag":98,"props":1077,"children":1078},{"style":111},[1079],{"type":49,"value":182},{"type":44,"tag":98,"props":1081,"children":1082},{"class":100,"line":385},[1083,1087,1091,1095,1099,1103],{"type":44,"tag":98,"props":1084,"children":1085},{"style":189},[1086],{"type":49,"value":360},{"type":44,"tag":98,"props":1088,"children":1089},{"style":111},[1090],{"type":49,"value":197},{"type":44,"tag":98,"props":1092,"children":1093},{"style":111},[1094],{"type":49,"value":135},{"type":44,"tag":98,"props":1096,"children":1097},{"style":138},[1098],{"type":49,"value":373},{"type":44,"tag":98,"props":1100,"children":1101},{"style":111},[1102],{"type":49,"value":146},{"type":44,"tag":98,"props":1104,"children":1105},{"style":111},[1106],{"type":49,"value":382},{"type":44,"tag":98,"props":1108,"children":1110},{"class":100,"line":1109},13,[1111,1116,1120,1124,1129,1133],{"type":44,"tag":98,"props":1112,"children":1113},{"style":189},[1114],{"type":49,"value":1115},"  orderingAttribute",{"type":44,"tag":98,"props":1117,"children":1118},{"style":111},[1119],{"type":49,"value":197},{"type":44,"tag":98,"props":1121,"children":1122},{"style":111},[1123],{"type":49,"value":135},{"type":44,"tag":98,"props":1125,"children":1126},{"style":138},[1127],{"type":49,"value":1128},"cartId",{"type":44,"tag":98,"props":1130,"children":1131},{"style":111},[1132],{"type":49,"value":146},{"type":44,"tag":98,"props":1134,"children":1135},{"style":111},[1136],{"type":49,"value":382},{"type":44,"tag":98,"props":1138,"children":1140},{"class":100,"line":1139},14,[1141,1145,1149],{"type":44,"tag":98,"props":1142,"children":1143},{"style":111},[1144],{"type":49,"value":391},{"type":44,"tag":98,"props":1146,"children":1147},{"style":117},[1148],{"type":49,"value":396},{"type":44,"tag":98,"props":1150,"children":1151},{"style":111},[1152],{"type":49,"value":151},{"type":44,"tag":402,"props":1154,"children":1156},{"id":1155},"topic-references",[1157],{"type":49,"value":1158},"Topic References",{"type":44,"tag":59,"props":1160,"children":1161},{},[1162],{"type":49,"value":1163},"Pass topic access to other code while maintaining static analysis:",{"type":44,"tag":88,"props":1165,"children":1167},{"className":90,"code":1166,"language":19,"meta":92,"style":92},"import { Publisher } from \"encore.dev\u002Fpubsub\";\n\nconst publisherRef = orderCreated.ref\u003CPublisher>();\n\nasync function notifyOrder(ref: typeof publisherRef, orderId: string) {\n  await ref.publish({ orderId, userId: \"123\", total: 99.99 });\n}\n",[1168],{"type":44,"tag":65,"props":1169,"children":1170},{"__ignoreMap":92},[1171,1211,1218,1269,1276,1341,1429],{"type":44,"tag":98,"props":1172,"children":1173},{"class":100,"line":101},[1174,1178,1182,1187,1191,1195,1199,1203,1207],{"type":44,"tag":98,"props":1175,"children":1176},{"style":105},[1177],{"type":49,"value":108},{"type":44,"tag":98,"props":1179,"children":1180},{"style":111},[1181],{"type":49,"value":114},{"type":44,"tag":98,"props":1183,"children":1184},{"style":117},[1185],{"type":49,"value":1186}," Publisher",{"type":44,"tag":98,"props":1188,"children":1189},{"style":111},[1190],{"type":49,"value":125},{"type":44,"tag":98,"props":1192,"children":1193},{"style":105},[1194],{"type":49,"value":130},{"type":44,"tag":98,"props":1196,"children":1197},{"style":111},[1198],{"type":49,"value":135},{"type":44,"tag":98,"props":1200,"children":1201},{"style":138},[1202],{"type":49,"value":141},{"type":44,"tag":98,"props":1204,"children":1205},{"style":111},[1206],{"type":49,"value":146},{"type":44,"tag":98,"props":1208,"children":1209},{"style":111},[1210],{"type":49,"value":151},{"type":44,"tag":98,"props":1212,"children":1213},{"class":100,"line":154},[1214],{"type":44,"tag":98,"props":1215,"children":1216},{"emptyLinePlaceholder":158},[1217],{"type":49,"value":161},{"type":44,"tag":98,"props":1219,"children":1220},{"class":100,"line":164},[1221,1225,1230,1234,1238,1242,1247,1251,1256,1260,1265],{"type":44,"tag":98,"props":1222,"children":1223},{"style":168},[1224],{"type":49,"value":606},{"type":44,"tag":98,"props":1226,"children":1227},{"style":117},[1228],{"type":49,"value":1229}," publisherRef ",{"type":44,"tag":98,"props":1231,"children":1232},{"style":111},[1233],{"type":49,"value":299},{"type":44,"tag":98,"props":1235,"children":1236},{"style":117},[1237],{"type":49,"value":427},{"type":44,"tag":98,"props":1239,"children":1240},{"style":111},[1241],{"type":49,"value":432},{"type":44,"tag":98,"props":1243,"children":1244},{"style":307},[1245],{"type":49,"value":1246},"ref",{"type":44,"tag":98,"props":1248,"children":1249},{"style":111},[1250],{"type":49,"value":314},{"type":44,"tag":98,"props":1252,"children":1253},{"style":174},[1254],{"type":49,"value":1255},"Publisher",{"type":44,"tag":98,"props":1257,"children":1258},{"style":111},[1259],{"type":49,"value":324},{"type":44,"tag":98,"props":1261,"children":1262},{"style":117},[1263],{"type":49,"value":1264},"()",{"type":44,"tag":98,"props":1266,"children":1267},{"style":111},[1268],{"type":49,"value":151},{"type":44,"tag":98,"props":1270,"children":1271},{"class":100,"line":185},[1272],{"type":44,"tag":98,"props":1273,"children":1274},{"emptyLinePlaceholder":158},[1275],{"type":49,"value":161},{"type":44,"tag":98,"props":1277,"children":1278},{"class":100,"line":28},[1279,1284,1289,1294,1298,1302,1306,1311,1316,1320,1325,1329,1333,1337],{"type":44,"tag":98,"props":1280,"children":1281},{"style":168},[1282],{"type":49,"value":1283},"async",{"type":44,"tag":98,"props":1285,"children":1286},{"style":168},[1287],{"type":49,"value":1288}," function",{"type":44,"tag":98,"props":1290,"children":1291},{"style":307},[1292],{"type":49,"value":1293}," notifyOrder",{"type":44,"tag":98,"props":1295,"children":1296},{"style":111},[1297],{"type":49,"value":329},{"type":44,"tag":98,"props":1299,"children":1300},{"style":678},[1301],{"type":49,"value":1246},{"type":44,"tag":98,"props":1303,"children":1304},{"style":111},[1305],{"type":49,"value":197},{"type":44,"tag":98,"props":1307,"children":1308},{"style":111},[1309],{"type":49,"value":1310}," typeof",{"type":44,"tag":98,"props":1312,"children":1313},{"style":117},[1314],{"type":49,"value":1315}," publisherRef",{"type":44,"tag":98,"props":1317,"children":1318},{"style":111},[1319],{"type":49,"value":347},{"type":44,"tag":98,"props":1321,"children":1322},{"style":678},[1323],{"type":49,"value":1324}," orderId",{"type":44,"tag":98,"props":1326,"children":1327},{"style":111},[1328],{"type":49,"value":197},{"type":44,"tag":98,"props":1330,"children":1331},{"style":174},[1332],{"type":49,"value":202},{"type":44,"tag":98,"props":1334,"children":1335},{"style":111},[1336],{"type":49,"value":396},{"type":44,"tag":98,"props":1338,"children":1339},{"style":111},[1340],{"type":49,"value":182},{"type":44,"tag":98,"props":1342,"children":1343},{"class":100,"line":229},[1344,1349,1354,1358,1362,1366,1371,1375,1379,1384,1388,1392,1396,1400,1404,1409,1413,1417,1421,1425],{"type":44,"tag":98,"props":1345,"children":1346},{"style":105},[1347],{"type":49,"value":1348},"  await",{"type":44,"tag":98,"props":1350,"children":1351},{"style":117},[1352],{"type":49,"value":1353}," ref",{"type":44,"tag":98,"props":1355,"children":1356},{"style":111},[1357],{"type":49,"value":432},{"type":44,"tag":98,"props":1359,"children":1360},{"style":307},[1361],{"type":49,"value":437},{"type":44,"tag":98,"props":1363,"children":1364},{"style":189},[1365],{"type":49,"value":329},{"type":44,"tag":98,"props":1367,"children":1368},{"style":111},[1369],{"type":49,"value":1370},"{",{"type":44,"tag":98,"props":1372,"children":1373},{"style":117},[1374],{"type":49,"value":1324},{"type":44,"tag":98,"props":1376,"children":1377},{"style":111},[1378],{"type":49,"value":347},{"type":44,"tag":98,"props":1380,"children":1381},{"style":189},[1382],{"type":49,"value":1383}," userId",{"type":44,"tag":98,"props":1385,"children":1386},{"style":111},[1387],{"type":49,"value":197},{"type":44,"tag":98,"props":1389,"children":1390},{"style":111},[1391],{"type":49,"value":135},{"type":44,"tag":98,"props":1393,"children":1394},{"style":138},[1395],{"type":49,"value":466},{"type":44,"tag":98,"props":1397,"children":1398},{"style":111},[1399],{"type":49,"value":146},{"type":44,"tag":98,"props":1401,"children":1402},{"style":111},[1403],{"type":49,"value":347},{"type":44,"tag":98,"props":1405,"children":1406},{"style":189},[1407],{"type":49,"value":1408}," total",{"type":44,"tag":98,"props":1410,"children":1411},{"style":111},[1412],{"type":49,"value":197},{"type":44,"tag":98,"props":1414,"children":1415},{"style":516},[1416],{"type":49,"value":519},{"type":44,"tag":98,"props":1418,"children":1419},{"style":111},[1420],{"type":49,"value":125},{"type":44,"tag":98,"props":1422,"children":1423},{"style":189},[1424],{"type":49,"value":396},{"type":44,"tag":98,"props":1426,"children":1427},{"style":111},[1428],{"type":49,"value":151},{"type":44,"tag":98,"props":1430,"children":1431},{"class":100,"line":251},[1432],{"type":44,"tag":98,"props":1433,"children":1434},{"style":111},[1435],{"type":49,"value":257},{"type":44,"tag":52,"props":1437,"children":1439},{"id":1438},"delivery-guarantees",[1440],{"type":49,"value":1441},"Delivery Guarantees",{"type":44,"tag":1443,"props":1444,"children":1445},"ul",{},[1446,1457],{"type":44,"tag":1447,"props":1448,"children":1449},"li",{},[1450,1455],{"type":44,"tag":65,"props":1451,"children":1453},{"className":1452},[],[1454],{"type":49,"value":373},{"type":49,"value":1456}," (default): may deliver duplicates → handlers must be idempotent.",{"type":44,"tag":1447,"props":1458,"children":1459},{},[1460,1466],{"type":44,"tag":65,"props":1461,"children":1463},{"className":1462},[],[1464],{"type":49,"value":1465},"exactly-once",{"type":49,"value":1467},": stricter, capped throughput (AWS 300 msg\u002Fs\u002Ftopic, GCP 3000+ msg\u002Fs\u002Fregion). Does not deduplicate on the publish side.",{"type":44,"tag":52,"props":1469,"children":1471},{"id":1470},"guidelines",[1472],{"type":49,"value":1473},"Guidelines",{"type":44,"tag":1443,"props":1475,"children":1476},{},[1477,1482,1487,1498],{"type":44,"tag":1447,"props":1478,"children":1479},{},[1480],{"type":49,"value":1481},"Topics and subscriptions must be declared at package level.",{"type":44,"tag":1447,"props":1483,"children":1484},{},[1485],{"type":49,"value":1486},"Subscription handlers must be idempotent (at-least-once delivery is the default).",{"type":44,"tag":1447,"props":1488,"children":1489},{},[1490,1491,1496],{"type":49,"value":784},{"type":44,"tag":65,"props":1492,"children":1494},{"className":1493},[],[1495],{"type":49,"value":790},{"type":49,"value":1497}," for fields meant for filtering\u002Fordering, not for arbitrary metadata.",{"type":44,"tag":1447,"props":1499,"children":1500},{},[1501,1503,1508,1510,1515],{"type":49,"value":1502},"Don't do heavy synchronous work in ",{"type":44,"tag":65,"props":1504,"children":1506},{"className":1505},[],[1507],{"type":49,"value":437},{"type":49,"value":1509}," callers — ",{"type":44,"tag":65,"props":1511,"children":1513},{"className":1512},[],[1514],{"type":49,"value":437},{"type":49,"value":1516}," returns once the message is queued.",{"type":44,"tag":1518,"props":1519,"children":1520},"style",{},[1521],{"type":49,"value":1522},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1524,"total":1624},[1525,1537,1549,1565,1581,1593,1609],{"slug":1526,"name":1526,"fn":1527,"description":1528,"org":1529,"tags":1530,"stars":24,"repoUrl":25,"updatedAt":1536},"encore-api","build type-safe APIs with Encore","Define typed API endpoints in Encore.ts using `api(...)` from `encore.dev\u002Fapi`. Covers typed request\u002Fresponse interfaces, path\u002Fquery\u002Fheader\u002Fcookie params, request validation, and `APIError`. For raw endpoints (`api.raw()`) and inbound webhooks, use `encore-webhook` instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1531,1534,1535],{"name":1532,"slug":1533,"type":16},"API Development","api-development",{"name":9,"slug":8,"type":16},{"name":18,"slug":19,"type":16},"2026-04-06T18:09:46.044101",{"slug":1538,"name":1538,"fn":1539,"description":1540,"org":1541,"tags":1542,"stars":24,"repoUrl":25,"updatedAt":1548},"encore-auth","implement Encore.ts authentication","Protect Encore.ts endpoints with authentication and authorize callers. Covers `authHandler`, `Gateway`, `getAuthData`, and `auth: true`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1543,1546,1547],{"name":1544,"slug":1545,"type":16},"Auth","auth",{"name":9,"slug":8,"type":16},{"name":18,"slug":19,"type":16},"2026-04-06T18:09:47.336322",{"slug":1550,"name":1550,"fn":1551,"description":1552,"org":1553,"tags":1554,"stars":24,"repoUrl":25,"updatedAt":1564},"encore-bucket","store files in Encore.ts buckets","Store unstructured files in Encore.ts using `Bucket` from `encore.dev\u002Fstorage\u002Fobjects` — uploads, images, documents, blobs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1555,1556,1557,1560,1563],{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1558,"slug":1559,"type":16},"File Storage","file-storage",{"name":1561,"slug":1562,"type":16},"File Uploads","file-uploads",{"name":18,"slug":19,"type":16},"2026-05-16T05:59:52.813772",{"slug":1566,"name":1566,"fn":1567,"description":1568,"org":1569,"tags":1570,"stars":24,"repoUrl":25,"updatedAt":1580},"encore-cache","cache data in Redis with Encore.ts","Cache data in Redis from Encore.ts using `CacheCluster` and typed keyspaces from `encore.dev\u002Fstorage\u002Fcache`. Type-safe key\u002Fvalue access with TTLs, atomic increments, and per-keyspace data shapes.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1571,1572,1575,1576,1579],{"name":14,"slug":15,"type":16},{"name":1573,"slug":1574,"type":16},"Caching","caching",{"name":9,"slug":8,"type":16},{"name":1577,"slug":1578,"type":16},"Redis","redis",{"name":18,"slug":19,"type":16},"2026-05-16T05:59:56.808328",{"slug":1582,"name":1582,"fn":1583,"description":1584,"org":1585,"tags":1586,"stars":24,"repoUrl":25,"updatedAt":1592},"encore-code-review","review Encore.ts code","Review existing Encore.ts code for best practices and common anti-patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1587,1590,1591],{"name":1588,"slug":1589,"type":16},"Code Review","code-review",{"name":9,"slug":8,"type":16},{"name":18,"slug":19,"type":16},"2026-04-06T18:10:01.123999",{"slug":1594,"name":1594,"fn":1595,"description":1596,"org":1597,"tags":1598,"stars":24,"repoUrl":25,"updatedAt":1608},"encore-cron","schedule recurring jobs in Encore.ts","Schedule periodic \u002F recurring work in Encore.ts using `CronJob` from `encore.dev\u002Fcron`. Covers `every: \"1h\"` interval syntax and `schedule: \"0 9 * * 1\"` cron expressions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1599,1602,1603,1604,1607],{"name":1600,"slug":1601,"type":16},"Automation","automation",{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1605,"slug":1606,"type":16},"Scheduling","scheduling",{"name":18,"slug":19,"type":16},"2026-05-16T05:59:54.146651",{"slug":1610,"name":1610,"fn":1611,"description":1612,"org":1613,"tags":1614,"stars":24,"repoUrl":25,"updatedAt":1623},"encore-database","build Encore databases","Work with PostgreSQL in Encore.ts using `SQLDatabase` from `encore.dev\u002Fstorage\u002Fsqldb` — schema migrations and SQL queries.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1615,1618,1619,1622],{"name":1616,"slug":1617,"type":16},"Database","database",{"name":9,"slug":8,"type":16},{"name":1620,"slug":1621,"type":16},"ORM","orm",{"name":18,"slug":19,"type":16},"2026-04-06T18:09:54.823017",28,{"items":1626,"total":1624},[1627,1633,1639,1647,1655,1661,1669,1676,1693,1710,1722,1733],{"slug":1526,"name":1526,"fn":1527,"description":1528,"org":1628,"tags":1629,"stars":24,"repoUrl":25,"updatedAt":1536},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1630,1631,1632],{"name":1532,"slug":1533,"type":16},{"name":9,"slug":8,"type":16},{"name":18,"slug":19,"type":16},{"slug":1538,"name":1538,"fn":1539,"description":1540,"org":1634,"tags":1635,"stars":24,"repoUrl":25,"updatedAt":1548},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1636,1637,1638],{"name":1544,"slug":1545,"type":16},{"name":9,"slug":8,"type":16},{"name":18,"slug":19,"type":16},{"slug":1550,"name":1550,"fn":1551,"description":1552,"org":1640,"tags":1641,"stars":24,"repoUrl":25,"updatedAt":1564},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1642,1643,1644,1645,1646],{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1558,"slug":1559,"type":16},{"name":1561,"slug":1562,"type":16},{"name":18,"slug":19,"type":16},{"slug":1566,"name":1566,"fn":1567,"description":1568,"org":1648,"tags":1649,"stars":24,"repoUrl":25,"updatedAt":1580},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1650,1651,1652,1653,1654],{"name":14,"slug":15,"type":16},{"name":1573,"slug":1574,"type":16},{"name":9,"slug":8,"type":16},{"name":1577,"slug":1578,"type":16},{"name":18,"slug":19,"type":16},{"slug":1582,"name":1582,"fn":1583,"description":1584,"org":1656,"tags":1657,"stars":24,"repoUrl":25,"updatedAt":1592},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1658,1659,1660],{"name":1588,"slug":1589,"type":16},{"name":9,"slug":8,"type":16},{"name":18,"slug":19,"type":16},{"slug":1594,"name":1594,"fn":1595,"description":1596,"org":1662,"tags":1663,"stars":24,"repoUrl":25,"updatedAt":1608},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1664,1665,1666,1667,1668],{"name":1600,"slug":1601,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1605,"slug":1606,"type":16},{"name":18,"slug":19,"type":16},{"slug":1610,"name":1610,"fn":1611,"description":1612,"org":1670,"tags":1671,"stars":24,"repoUrl":25,"updatedAt":1623},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1672,1673,1674,1675],{"name":1616,"slug":1617,"type":16},{"name":9,"slug":8,"type":16},{"name":1620,"slug":1621,"type":16},{"name":18,"slug":19,"type":16},{"slug":1677,"name":1677,"fn":1678,"description":1679,"org":1680,"tags":1681,"stars":24,"repoUrl":25,"updatedAt":1692},"encore-frontend","connect frontend to Encore backend","Connect a frontend application (React, Next.js, Vue, Svelte, etc.) to an Encore.ts backend.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1682,1683,1686,1689],{"name":9,"slug":8,"type":16},{"name":1684,"slug":1685,"type":16},"Frontend","frontend",{"name":1687,"slug":1688,"type":16},"Next.js","next-js",{"name":1690,"slug":1691,"type":16},"React","react","2026-04-06T18:09:56.091006",{"slug":1694,"name":1694,"fn":1695,"description":1696,"org":1697,"tags":1698,"stars":24,"repoUrl":25,"updatedAt":1709},"encore-getting-started","build and run applications with Encore.ts","Bootstrap a brand-new Encore.ts project from zero. Only for first-time CLI install and `encore app create` — not for architecture or feature questions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1699,1700,1701,1702,1705,1706],{"name":1532,"slug":1533,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1703,"slug":1704,"type":16},"Local Development","local-development",{"name":18,"slug":19,"type":16},{"name":1707,"slug":1708,"type":16},"Web Development","web-development","2026-04-06T18:10:04.885446",{"slug":1711,"name":1711,"fn":1712,"description":1713,"org":1714,"tags":1715,"stars":24,"repoUrl":25,"updatedAt":1721},"encore-go-api","build APIs with Encore Go","Define typed API endpoints in Encore Go using `\u002F\u002Fencore:api` annotations. Covers typed request\u002Fresponse structs, path\u002Fquery\u002Fheader\u002Fcookie params, and error returns. For raw endpoints (`\u002F\u002Fencore:api raw`) and inbound webhooks, use `encore-go-webhook` instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1716,1717,1718],{"name":1532,"slug":1533,"type":16},{"name":9,"slug":8,"type":16},{"name":1719,"slug":1720,"type":16},"Go","go","2026-04-06T18:09:48.578781",{"slug":1723,"name":1723,"fn":1724,"description":1725,"org":1726,"tags":1727,"stars":24,"repoUrl":25,"updatedAt":1732},"encore-go-auth","implement authentication with Encore Go","Protect Encore Go endpoints with authentication and authorize callers. Covers `auth.AuthHandler`, `auth.UserID`, the `Authorization` header, and `\u002F\u002Fencore:api auth`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1728,1729,1730,1731],{"name":1544,"slug":1545,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1719,"slug":1720,"type":16},"2026-04-06T18:09:51.065102",{"slug":1734,"name":1734,"fn":1735,"description":1736,"org":1737,"tags":1738,"stars":24,"repoUrl":25,"updatedAt":1746},"encore-go-bucket","store files in Encore Go buckets","Store unstructured files in Encore Go using `objects.NewBucket` from `encore.dev\u002Fstorage\u002Fobjects` — uploads, images, documents, blobs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1739,1740,1741,1742,1743],{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":1558,"slug":1559,"type":16},{"name":1719,"slug":1720,"type":16},{"name":1744,"slug":1745,"type":16},"Storage","storage","2026-05-16T06:00:03.633918"]