[{"data":1,"prerenderedAt":1283},["ShallowReactive",2],{"$fU8iwoqEHKIjXE56AdwCZwz3xTzQT4QntJaMpJQleceA":3},{"slug":4,"title":5,"description":6,"source":7,"document":8,"toc":1264,"editUrl":1277,"prev":1278,"next":1281},"techniques\u002Fmessaging","Messaging (NATS & Kafka)","Publish and consume messages with NATS and Kafka handlers that share the module model.","---\ntitle: Messaging (NATS & Kafka)\ndescription: Publish and consume messages with NATS and Kafka handlers that share the module model.\n---\n\n# Messaging (NATS & Kafka)\n\nFerrite treats message brokers as first-class modules. Both **NATS** and **Kafka** follow the same pattern: a handler trait describing a `PATTERN` (subject or topic), a `submit_*_handler!` registry, and a server that starts on bootstrap.\n\n## NATS\n\n```cargo\nfr add nats\n```\n\n```rust\n#[module(imports = [NatsModuleImpl])]\npub struct AppModule;\n```\n\n### Handlers\n\n```rust\nuse ferrite_nats::{MessageHandler, NatsMessage, submit_nats_handler};\nuse serde::{Deserialize, Serialize};\n\n#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct OrderPlaced { pub order_id: i64 }\n\npub struct OrderNotifier;\n\n#[ferrite_framework::async_trait]\nimpl MessageHandler for OrderNotifier {\n    const PATTERN: &'static str = \"orders.placed\";\n\n    async fn handle(&self, msg: NatsMessage\u003COrderPlaced>) {\n        let OrderPlaced { order_id } = msg.payload;\n        notify(order_id).await;\n    }\n}\n\nsubmit_nats_handler!(OrderNotifier);\n```\n\n`NatsMessage\u003CP>` wraps the typed payload. The server dispatches by pattern (subject) to the matching handler.\n\n### Publishing\n\n```rust\nuse ferrite_nats::NatsServer;\n\n#[injectable]\npub struct OrdersService {\n    nats: NatsServer,\n}\n\nimpl OrdersService {\n    #[inject]\n    pub fn new(nats: NatsServer) -> Self {\n        Self { nats }\n    }\n\n    pub async fn placed(&self, order_id: i64) -> Result\u003C(), NatsError> {\n        self.nats.publish(\"orders.placed\", None, &OrderPlaced { order_id }).await\n    }\n}\n```\n\n| `NatsServer` method | Purpose |\n| --- | --- |\n| `publish(subject, reply, payload)` | Raw payload publish |\n| `publish\u003CM>(subject, reply, &message)` | Typed payload publish |\n| `subscribe(subject)` | Return a subscription |\n| `dispatch(msg)` | Route one message to handlers |\n| `run()` | Consume the loop (started for you) |\n| `patterns()` | Registered subjects |\n\n## Kafka\n\n```cargo\nfr add kafka\n```\n\n```rust\n#[module(imports = [KafkaModuleImpl])]\npub struct AppModule;\n```\n\n### Handlers\n\n```rust\nuse ferrite_kafka::{KafkaHandler, KafkaMessage, submit_kafka_handler};\n\n#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]\npub struct OrderShipped { pub order_id: i64, pub tracking: String }\n\npub struct ShipmentHandler;\n\n#[ferrite_framework::async_trait]\nimpl KafkaHandler for ShipmentHandler {\n    const PATTERN: &'static str = \"orders.shipped\";\n\n    async fn handle(&self, msg: KafkaMessage\u003COrderShipped>) {\n        \u002F\u002F msg.payload: OrderShipped\n    }\n}\n\nsubmit_kafka_handler!(ShipmentHandler);\n```\n\n### Producing & consuming\n\n| `KafkaServer` method | Purpose |\n| --- | --- |\n| `produce(topic, key, payload)` | Raw producer |\n| `produce\u003CM>(topic, key, &message)` | Typed producer |\n| `consume_batch(topic, limit)` | Pull `Vec\u003CRawMessage>` |\n| `dispatch_one(msg)` | Route a message to handlers |\n| `tick()` | Poll once |\n| `run()` | Consume loop |\n| `patterns()` | Registered topics |\n\n## Lifecycle\n\nBoth `NatsModuleImpl` and `KafkaModuleImpl` implement `OnApplicationBootstrap`, and both spawn their consume loops as `tokio` tasks during bootstrap. You never call `run()` yourself.\n\n## Producing from HTTP handlers\n\n```rust\n#[controller(\"\u002Forders\")]\npub struct OrdersController { orders: OrdersService }\n\n#[impl_controller]\nimpl OrdersController {\n    #[inject]\n    pub fn new(orders: OrdersService) -> Self { Self { orders } }\n\n    #[post(\"\u002F\")]\n    pub async fn create(&self, Json(dto): Json\u003CCreateOrderDto>) -> Result\u003CJson\u003C()>, HttpError> {\n        self.orders.placed(dto.order_id).await.map_err(HttpError::internal)?;\n        Ok(Json(()))\n    }\n}\n```\n\n## Next steps\n\n- [Background jobs](\u002Fdocs\u002Ftechniques\u002Fbackground-jobs).\n- [CQRS](\u002Fdocs\u002Ftechniques\u002Fcqrs).",{"frontmatter":9,"meta":10,"nodes":44},{"title":5,"description":6},{"toc":11},{"title":12,"searchDepth":13,"depth":14,"links":15},"On This Page",2,3,[16,26,35,38,41],{"id":17,"depth":13,"text":18,"children":19},"nats","NATS",[20,23],{"id":21,"depth":14,"text":22},"nats-handlers","Handlers",{"id":24,"depth":14,"text":25},"nats-publishing","Publishing",{"id":27,"depth":13,"text":28,"children":29},"kafka","Kafka",[30,32],{"id":31,"depth":14,"text":22},"kafka-handlers",{"id":33,"depth":14,"text":34},"kafka-producing-consuming","Producing & consuming",{"id":36,"depth":13,"text":37},"lifecycle","Lifecycle",{"id":39,"depth":13,"text":40},"producing-from-http-handlers","Producing from HTTP handlers",{"id":42,"depth":13,"text":43},"next-steps","Next steps",[45,49,69,72,81,126,129,404,410,412,605,687,689,694,721,723,926,928,1014,1016,1035,1037,1245,1247],[46,47,5],"h1",{"id":48},"messaging-nats-kafka",[50,51,52,53,56,57,59,60,64,65,68],"p",{},"Ferrite treats message brokers as first-class modules. Both ",[54,55,18],"strong",{}," and ",[54,58,28],{}," follow the same pattern: a handler trait describing a ",[61,62,63],"code",{},"PATTERN"," (subject or topic), a ",[61,66,67],{},"submit_*_handler!"," registry, and a server that starts on bootstrap.",[70,71,18],"h2",{"id":17},[73,74,77],"pre",{"language":75,"class":76},"cargo","shiki dark:github-dark",[61,78,80],{"class":79},"language-cargo","fr add nats",[73,82,85],{"language":83,"class":84},"rust","shiki shiki-themes github-light github-dark dark:github-dark",[61,86,88,111,112],{"class":87},"language-rust",[89,90,93,97,101,104,108],"span",{"class":91,"style":92},"line","display: inline",[89,94,96],{"style":95},"color:#24292E;--shiki-dark:#E1E4E8","#[module(imports ",[89,98,100],{"style":99},"color:#D73A49;--shiki-dark:#F97583","=",[89,102,103],{"style":95}," [",[89,105,107],{"style":106},"color:#6F42C1;--shiki-dark:#B392F0","NatsModuleImpl",[89,109,110],{"style":95},"])]","\n",[89,113,114,117,120,123],{"class":91,"style":92},[89,115,116],{"style":99},"pub",[89,118,119],{"style":99}," struct",[89,121,122],{"style":106}," AppModule",[89,124,125],{"style":95},";",[127,128,22],"h3",{"id":21},[73,130,131],{"language":83,"class":84},[61,132,133,111,159,111,181,111,183,111,207,111,233,111,235,111,246,111,248,111,258,111,274,111,306,111,308,111,345,111,366,111,379,111,384,111,389,111,391],{"class":87},[89,134,135,138,141,144,147,150,153,156],{"class":91,"style":92},[89,136,137],{"style":99},"use",[89,139,140],{"style":106}," ferrite_nats",[89,142,143],{"style":99},"::",[89,145,146],{"style":95},"{",[89,148,149],{"style":106},"MessageHandler",[89,151,152],{"style":95},", ",[89,154,155],{"style":106},"NatsMessage",[89,157,158],{"style":95},", submit_nats_handler};",[89,160,161,163,166,168,170,173,175,178],{"class":91,"style":92},[89,162,137],{"style":99},[89,164,165],{"style":106}," serde",[89,167,143],{"style":99},[89,169,146],{"style":95},[89,171,172],{"style":106},"Deserialize",[89,174,152],{"style":95},[89,176,177],{"style":106},"Serialize",[89,179,180],{"style":95},"};",[89,182],{"class":91,"style":92},[89,184,185,188,191,193,196,198,200,202,204],{"class":91,"style":92},[89,186,187],{"style":95},"#[derive(",[89,189,190],{"style":106},"Debug",[89,192,152],{"style":95},[89,194,195],{"style":106},"Clone",[89,197,152],{"style":95},[89,199,177],{"style":106},[89,201,152],{"style":95},[89,203,172],{"style":106},[89,205,206],{"style":95},")]",[89,208,209,211,213,216,219,221,224,227,230],{"class":91,"style":92},[89,210,116],{"style":99},[89,212,119],{"style":99},[89,214,215],{"style":106}," OrderPlaced",[89,217,218],{"style":95}," { ",[89,220,116],{"style":99},[89,222,223],{"style":95}," order_id",[89,225,226],{"style":99},":",[89,228,229],{"style":106}," i64",[89,231,232],{"style":95}," }",[89,234],{"class":91,"style":92},[89,236,237,239,241,244],{"class":91,"style":92},[89,238,116],{"style":99},[89,240,119],{"style":99},[89,242,243],{"style":106}," OrderNotifier",[89,245,125],{"style":95},[89,247],{"class":91,"style":92},[89,249,250,253,255],{"class":91,"style":92},[89,251,252],{"style":95},"#[ferrite_framework",[89,254,143],{"style":99},[89,256,257],{"style":95},"async_trait]",[89,259,260,263,266,269,271],{"class":91,"style":92},[89,261,262],{"style":99},"impl",[89,264,265],{"style":106}," MessageHandler",[89,267,268],{"style":99}," for",[89,270,243],{"style":106},[89,272,273],{"style":95}," {",[89,275,276,279,283,285,288,291,294,297,300,304],{"class":91,"style":92},[89,277,278],{"style":99},"    const",[89,280,282],{"style":281},"color:#005CC5;--shiki-dark:#79B8FF"," PATTERN",[89,284,226],{"style":99},[89,286,287],{"style":99}," &",[89,289,290],{"style":95},"'",[89,292,293],{"style":106},"static",[89,295,296],{"style":106}," str",[89,298,299],{"style":99}," =",[89,301,303],{"style":302},"color:#032F62;--shiki-dark:#9ECBFF"," \"orders.placed\"",[89,305,125],{"style":95},[89,307],{"class":91,"style":92},[89,309,310,313,316,319,322,325,328,331,333,336,339,342],{"class":91,"style":92},[89,311,312],{"style":99},"    async",[89,314,315],{"style":99}," fn",[89,317,318],{"style":106}," handle",[89,320,321],{"style":95},"(",[89,323,324],{"style":99},"&",[89,326,327],{"style":281},"self",[89,329,330],{"style":95},", msg",[89,332,226],{"style":99},[89,334,335],{"style":106}," NatsMessage",[89,337,338],{"style":95},"\u003C",[89,340,341],{"style":106},"OrderPlaced",[89,343,344],{"style":95},">) {",[89,346,347,350,352,355,357,360,363],{"class":91,"style":92},[89,348,349],{"style":99},"        let",[89,351,215],{"style":106},[89,353,354],{"style":95}," { order_id } ",[89,356,100],{"style":99},[89,358,359],{"style":95}," msg",[89,361,362],{"style":99},".",[89,364,365],{"style":95},"payload;",[89,367,368,371,374,377],{"class":91,"style":92},[89,369,370],{"style":106},"        notify",[89,372,373],{"style":95},"(order_id)",[89,375,376],{"style":99},".await",[89,378,125],{"style":95},[89,380,381],{"class":91,"style":92},[89,382,383],{"style":95},"    }",[89,385,386],{"class":91,"style":92},[89,387,388],{"style":95},"}",[89,390],{"class":91,"style":92},[89,392,393,396,398,401],{"class":91,"style":92},[89,394,395],{"style":106},"submit_nats_handler!",[89,397,321],{"style":95},[89,399,400],{"style":106},"OrderNotifier",[89,402,403],{"style":95},");",[50,405,406,409],{},[61,407,408],{},"NatsMessage\u003CP>"," wraps the typed payload. The server dispatches by pattern (subject) to the matching handler.",[127,411,25],{"id":24},[73,413,414],{"language":83,"class":84},[61,415,416,111,429,111,431,111,436,111,447,111,460,111,464,111,466,111,474,111,479,111,507,111,515,111,519,111,521,111,562,111,597,111,601],{"class":87},[89,417,418,420,422,424,427],{"class":91,"style":92},[89,419,137],{"style":99},[89,421,140],{"style":106},[89,423,143],{"style":99},[89,425,426],{"style":106},"NatsServer",[89,428,125],{"style":95},[89,430],{"class":91,"style":92},[89,432,433],{"class":91,"style":92},[89,434,435],{"style":95},"#[injectable]",[89,437,438,440,442,445],{"class":91,"style":92},[89,439,116],{"style":99},[89,441,119],{"style":99},[89,443,444],{"style":106}," OrdersService",[89,446,273],{"style":95},[89,448,449,452,454,457],{"class":91,"style":92},[89,450,451],{"style":95},"    nats",[89,453,226],{"style":99},[89,455,456],{"style":106}," NatsServer",[89,458,459],{"style":95},",",[89,461,462],{"class":91,"style":92},[89,463,388],{"style":95},[89,465],{"class":91,"style":92},[89,467,468,470,472],{"class":91,"style":92},[89,469,262],{"style":99},[89,471,444],{"style":106},[89,473,273],{"style":95},[89,475,476],{"class":91,"style":92},[89,477,478],{"style":95},"    #[inject]",[89,480,481,484,486,489,492,494,496,499,502,505],{"class":91,"style":92},[89,482,483],{"style":99},"    pub",[89,485,315],{"style":99},[89,487,488],{"style":106}," new",[89,490,491],{"style":95},"(nats",[89,493,226],{"style":99},[89,495,456],{"style":106},[89,497,498],{"style":95},") ",[89,500,501],{"style":99},"->",[89,503,504],{"style":281}," Self",[89,506,273],{"style":95},[89,508,509,512],{"class":91,"style":92},[89,510,511],{"style":281},"        Self",[89,513,514],{"style":95}," { nats }",[89,516,517],{"class":91,"style":92},[89,518,383],{"style":95},[89,520],{"class":91,"style":92},[89,522,523,525,528,530,533,535,537,539,542,544,546,548,550,553,556,559],{"class":91,"style":92},[89,524,483],{"style":99},[89,526,527],{"style":99}," async",[89,529,315],{"style":99},[89,531,532],{"style":106}," placed",[89,534,321],{"style":95},[89,536,324],{"style":99},[89,538,327],{"style":281},[89,540,541],{"style":95},", order_id",[89,543,226],{"style":99},[89,545,229],{"style":106},[89,547,498],{"style":95},[89,549,501],{"style":99},[89,551,552],{"style":106}," Result",[89,554,555],{"style":95},"\u003C(), ",[89,557,558],{"style":106},"NatsError",[89,560,561],{"style":95},"> {",[89,563,564,567,569,571,573,576,578,581,583,586,588,590,592,595],{"class":91,"style":92},[89,565,566],{"style":281},"        self",[89,568,362],{"style":99},[89,570,17],{"style":95},[89,572,362],{"style":99},[89,574,575],{"style":106},"publish",[89,577,321],{"style":95},[89,579,580],{"style":302},"\"orders.placed\"",[89,582,152],{"style":95},[89,584,585],{"style":106},"None",[89,587,152],{"style":95},[89,589,324],{"style":99},[89,591,341],{"style":106},[89,593,594],{"style":95}," { order_id })",[89,596,376],{"style":99},[89,598,599],{"class":91,"style":92},[89,600,383],{"style":95},[89,602,603],{"class":91,"style":92},[89,604,388],{"style":95},[606,607,608,623],"table",{},[609,610,611],"thead",{},[612,613,614,620],"tr",{},[615,616,617,619],"th",{},[61,618,426],{}," method",[615,621,622],{},"Purpose",[624,625,626,637,647,657,667,677],"tbody",{},[612,627,628,634],{},[629,630,631],"td",{},[61,632,633],{},"publish(subject, reply, payload)",[629,635,636],{},"Raw payload publish",[612,638,639,644],{},[629,640,641],{},[61,642,643],{},"publish\u003CM>(subject, reply, &message)",[629,645,646],{},"Typed payload publish",[612,648,649,654],{},[629,650,651],{},[61,652,653],{},"subscribe(subject)",[629,655,656],{},"Return a subscription",[612,658,659,664],{},[629,660,661],{},[61,662,663],{},"dispatch(msg)",[629,665,666],{},"Route one message to handlers",[612,668,669,674],{},[629,670,671],{},[61,672,673],{},"run()",[629,675,676],{},"Consume the loop (started for you)",[612,678,679,684],{},[629,680,681],{},[61,682,683],{},"patterns()",[629,685,686],{},"Registered subjects",[70,688,28],{"id":27},[73,690,691],{"language":75,"class":76},[61,692,693],{"class":79},"fr add kafka",[73,695,696],{"language":83,"class":84},[61,697,698,111,711],{"class":87},[89,699,700,702,704,706,709],{"class":91,"style":92},[89,701,96],{"style":95},[89,703,100],{"style":99},[89,705,103],{"style":95},[89,707,708],{"style":106},"KafkaModuleImpl",[89,710,110],{"style":95},[89,712,713,715,717,719],{"class":91,"style":92},[89,714,116],{"style":99},[89,716,119],{"style":99},[89,718,122],{"style":106},[89,720,125],{"style":95},[127,722,22],{"id":31},[73,724,725],{"language":83,"class":84},[61,726,727,111,749,111,751,111,776,111,809,111,811,111,822,111,824,111,832,111,845,111,868,111,870,111,898,111,904,111,908,111,912,111,914],{"class":87},[89,728,729,731,734,736,738,741,743,746],{"class":91,"style":92},[89,730,137],{"style":99},[89,732,733],{"style":106}," ferrite_kafka",[89,735,143],{"style":99},[89,737,146],{"style":95},[89,739,740],{"style":106},"KafkaHandler",[89,742,152],{"style":95},[89,744,745],{"style":106},"KafkaMessage",[89,747,748],{"style":95},", submit_kafka_handler};",[89,750],{"class":91,"style":92},[89,752,753,755,757,759,761,764,766,768,770,772,774],{"class":91,"style":92},[89,754,187],{"style":95},[89,756,190],{"style":106},[89,758,152],{"style":95},[89,760,195],{"style":106},[89,762,763],{"style":95},", serde",[89,765,143],{"style":99},[89,767,177],{"style":106},[89,769,763],{"style":95},[89,771,143],{"style":99},[89,773,172],{"style":106},[89,775,206],{"style":95},[89,777,778,780,782,785,787,789,791,793,795,797,799,802,804,807],{"class":91,"style":92},[89,779,116],{"style":99},[89,781,119],{"style":99},[89,783,784],{"style":106}," OrderShipped",[89,786,218],{"style":95},[89,788,116],{"style":99},[89,790,223],{"style":95},[89,792,226],{"style":99},[89,794,229],{"style":106},[89,796,152],{"style":95},[89,798,116],{"style":99},[89,800,801],{"style":95}," tracking",[89,803,226],{"style":99},[89,805,806],{"style":106}," String",[89,808,232],{"style":95},[89,810],{"class":91,"style":92},[89,812,813,815,817,820],{"class":91,"style":92},[89,814,116],{"style":99},[89,816,119],{"style":99},[89,818,819],{"style":106}," ShipmentHandler",[89,821,125],{"style":95},[89,823],{"class":91,"style":92},[89,825,826,828,830],{"class":91,"style":92},[89,827,252],{"style":95},[89,829,143],{"style":99},[89,831,257],{"style":95},[89,833,834,836,839,841,843],{"class":91,"style":92},[89,835,262],{"style":99},[89,837,838],{"style":106}," KafkaHandler",[89,840,268],{"style":99},[89,842,819],{"style":106},[89,844,273],{"style":95},[89,846,847,849,851,853,855,857,859,861,863,866],{"class":91,"style":92},[89,848,278],{"style":99},[89,850,282],{"style":281},[89,852,226],{"style":99},[89,854,287],{"style":99},[89,856,290],{"style":95},[89,858,293],{"style":106},[89,860,296],{"style":106},[89,862,299],{"style":99},[89,864,865],{"style":302}," \"orders.shipped\"",[89,867,125],{"style":95},[89,869],{"class":91,"style":92},[89,871,872,874,876,878,880,882,884,886,888,891,893,896],{"class":91,"style":92},[89,873,312],{"style":99},[89,875,315],{"style":99},[89,877,318],{"style":106},[89,879,321],{"style":95},[89,881,324],{"style":99},[89,883,327],{"style":281},[89,885,330],{"style":95},[89,887,226],{"style":99},[89,889,890],{"style":106}," KafkaMessage",[89,892,338],{"style":95},[89,894,895],{"style":106},"OrderShipped",[89,897,344],{"style":95},[89,899,900],{"class":91,"style":92},[89,901,903],{"style":902},"color:#6A737D;--shiki-dark:#6A737D","        \u002F\u002F msg.payload: OrderShipped",[89,905,906],{"class":91,"style":92},[89,907,383],{"style":95},[89,909,910],{"class":91,"style":92},[89,911,388],{"style":95},[89,913],{"class":91,"style":92},[89,915,916,919,921,924],{"class":91,"style":92},[89,917,918],{"style":106},"submit_kafka_handler!",[89,920,321],{"style":95},[89,922,923],{"style":106},"ShipmentHandler",[89,925,403],{"style":95},[127,927,34],{"id":33},[606,929,930,941],{},[609,931,932],{},[612,933,934,939],{},[615,935,936,619],{},[61,937,938],{},"KafkaServer",[615,940,622],{},[624,942,943,953,963,976,986,996,1005],{},[612,944,945,950],{},[629,946,947],{},[61,948,949],{},"produce(topic, key, payload)",[629,951,952],{},"Raw producer",[612,954,955,960],{},[629,956,957],{},[61,958,959],{},"produce\u003CM>(topic, key, &message)",[629,961,962],{},"Typed producer",[612,964,965,970],{},[629,966,967],{},[61,968,969],{},"consume_batch(topic, limit)",[629,971,972,973],{},"Pull ",[61,974,975],{},"Vec\u003CRawMessage>",[612,977,978,983],{},[629,979,980],{},[61,981,982],{},"dispatch_one(msg)",[629,984,985],{},"Route a message to handlers",[612,987,988,993],{},[629,989,990],{},[61,991,992],{},"tick()",[629,994,995],{},"Poll once",[612,997,998,1002],{},[629,999,1000],{},[61,1001,673],{},[629,1003,1004],{},"Consume loop",[612,1006,1007,1011],{},[629,1008,1009],{},[61,1010,683],{},[629,1012,1013],{},"Registered topics",[70,1015,37],{"id":36},[50,1017,1018,1019,56,1021,1023,1024,1027,1028,1031,1032,1034],{},"Both ",[61,1020,107],{},[61,1022,708],{}," implement ",[61,1025,1026],{},"OnApplicationBootstrap",", and both spawn their consume loops as ",[61,1029,1030],{},"tokio"," tasks during bootstrap. You never call ",[61,1033,673],{}," yourself.",[70,1036,40],{"id":39},[73,1038,1039],{"language":83,"class":84},[61,1040,1041,111,1051,111,1069,111,1071,111,1076,111,1084,111,1088,111,1117,111,1119,111,1129,111,1183,111,1225,111,1237,111,1241],{"class":87},[89,1042,1043,1046,1049],{"class":91,"style":92},[89,1044,1045],{"style":95},"#[controller(",[89,1047,1048],{"style":302},"\"\u002Forders\"",[89,1050,206],{"style":95},[89,1052,1053,1055,1057,1060,1063,1065,1067],{"class":91,"style":92},[89,1054,116],{"style":99},[89,1056,119],{"style":99},[89,1058,1059],{"style":106}," OrdersController",[89,1061,1062],{"style":95}," { orders",[89,1064,226],{"style":99},[89,1066,444],{"style":106},[89,1068,232],{"style":95},[89,1070],{"class":91,"style":92},[89,1072,1073],{"class":91,"style":92},[89,1074,1075],{"style":95},"#[impl_controller]",[89,1077,1078,1080,1082],{"class":91,"style":92},[89,1079,262],{"style":99},[89,1081,1059],{"style":106},[89,1083,273],{"style":95},[89,1085,1086],{"class":91,"style":92},[89,1087,478],{"style":95},[89,1089,1090,1092,1094,1096,1099,1101,1103,1105,1107,1109,1111,1114],{"class":91,"style":92},[89,1091,483],{"style":99},[89,1093,315],{"style":99},[89,1095,488],{"style":106},[89,1097,1098],{"style":95},"(orders",[89,1100,226],{"style":99},[89,1102,444],{"style":106},[89,1104,498],{"style":95},[89,1106,501],{"style":99},[89,1108,504],{"style":281},[89,1110,218],{"style":95},[89,1112,1113],{"style":281},"Self",[89,1115,1116],{"style":95}," { orders } }",[89,1118],{"class":91,"style":92},[89,1120,1121,1124,1127],{"class":91,"style":92},[89,1122,1123],{"style":95},"    #[post(",[89,1125,1126],{"style":302},"\"\u002F\"",[89,1128,206],{"style":95},[89,1130,1131,1133,1135,1137,1140,1142,1144,1146,1148,1151,1154,1156,1159,1161,1164,1167,1169,1171,1173,1175,1178,1181],{"class":91,"style":92},[89,1132,483],{"style":99},[89,1134,527],{"style":99},[89,1136,315],{"style":99},[89,1138,1139],{"style":106}," create",[89,1141,321],{"style":95},[89,1143,324],{"style":99},[89,1145,327],{"style":281},[89,1147,152],{"style":95},[89,1149,1150],{"style":106},"Json",[89,1152,1153],{"style":95},"(dto)",[89,1155,226],{"style":99},[89,1157,1158],{"style":106}," Json",[89,1160,338],{"style":95},[89,1162,1163],{"style":106},"CreateOrderDto",[89,1165,1166],{"style":95},">) ",[89,1168,501],{"style":99},[89,1170,552],{"style":106},[89,1172,338],{"style":95},[89,1174,1150],{"style":106},[89,1176,1177],{"style":95},"\u003C()>, ",[89,1179,1180],{"style":106},"HttpError",[89,1182,561],{"style":95},[89,1184,1185,1187,1189,1192,1194,1197,1200,1202,1205,1208,1211,1213,1215,1217,1220,1223],{"class":91,"style":92},[89,1186,566],{"style":281},[89,1188,362],{"style":99},[89,1190,1191],{"style":95},"orders",[89,1193,362],{"style":99},[89,1195,1196],{"style":106},"placed",[89,1198,1199],{"style":95},"(dto",[89,1201,362],{"style":99},[89,1203,1204],{"style":95},"order_id)",[89,1206,1207],{"style":99},".await.",[89,1209,1210],{"style":106},"map_err",[89,1212,321],{"style":95},[89,1214,1180],{"style":106},[89,1216,143],{"style":99},[89,1218,1219],{"style":95},"internal)",[89,1221,1222],{"style":99},"?",[89,1224,125],{"style":95},[89,1226,1227,1230,1232,1234],{"class":91,"style":92},[89,1228,1229],{"style":106},"        Ok",[89,1231,321],{"style":95},[89,1233,1150],{"style":106},[89,1235,1236],{"style":95},"(()))",[89,1238,1239],{"class":91,"style":92},[89,1240,383],{"style":95},[89,1242,1243],{"class":91,"style":92},[89,1244,388],{"style":95},[70,1246,43],{"id":42},[1248,1249,1250,1258],"ul",{},[1251,1252,1253,362],"li",{},[1254,1255,1257],"a",{"href":1256},"\u002Fdocs\u002Ftechniques\u002Fbackground-jobs","Background jobs",[1251,1259,1260,362],{},[1254,1261,1263],{"href":1262},"\u002Fdocs\u002Ftechniques\u002Fcqrs","CQRS",{"title":12,"searchDepth":13,"depth":14,"links":1265},[1266,1270,1274,1275,1276],{"id":17,"depth":13,"text":18,"children":1267},[1268,1269],{"id":21,"depth":14,"text":22},{"id":24,"depth":14,"text":25},{"id":27,"depth":13,"text":28,"children":1271},[1272,1273],{"id":31,"depth":14,"text":22},{"id":33,"depth":14,"text":34},{"id":36,"depth":13,"text":37},{"id":39,"depth":13,"text":40},{"id":42,"depth":13,"text":43},"https:\u002F\u002Fgithub.com\u002Fj4flmao\u002Fferrite_rs\u002Fedit\u002Fmain\u002Fdocs\u002Fcontent\u002Ftechniques\u002Fmessaging.md",{"title":1279,"slug":1280},"gRPC","techniques\u002Fgrpc",{"title":1257,"slug":1282},"techniques\u002Fbackground-jobs",1789565440194]