use iridium_stomp::{Connection, Frame};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let conn = Connection::connect(
"127.0.0.1:61613",
"guest",
"guest",
Connection::DEFAULT_HEARTBEAT,
)
.await?;
let msg = Frame::new("SEND")
.header("destination", "/queue/test")
.header("content-type", "application/json")
.set_body(br#"{"event": "order_placed", "id": 42}"#.to_vec());
conn.send_frame(msg).await?;
println!("Message sent");
conn.close().await?;
Ok(())
}