Skip to content

adhesivee/stomp-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stomp-rs

Client

Creating new connection:

let client = Client::connect(
    ClientBuilder::new("127.0.0.1:61613")
).await?;

Subscribing:

let (sender, mut receiver) = channel(16);

tokio::spawn(async move {
  match receiver.recv().await {
    Some(frame) => { /* process frame */}
    None => { }
  }
});
client.subscribe(
    Subscribe::new_with_random_id("/topic/test"),
    sender
).await

Sending:

client.send(
    Send::new("/topic/test")
      .body("test-message")
).await

Transaction:

let transaction = client.begin().await?;

transaction.send(
    Send::new("/topic/test")
      .body("test-message")
).await

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages