Rust bindings for the Tibco EMS C library.
A low-level binding in provided by the module tibcoems::cbinding. A high-level binding is not yet part of this package.
tibco_ems is licensed under Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0).
TIBCO Enterprise Messaging Service, and all related components therein are property of TIBCO Software, and are not provided with this software package. Refer to your own TIBCO License terms for details.
To build this crate, the TIBCO EMS C library must either be in the LDLIBRARYPATH or alternatively a EMS_HOME environment variable must be set.
Put this in your Cargo.toml
:
text
[dependencies]
tibco_ems = "0.1"
Sending a text message to a queue.
```rust use tibcoems::Destination; use tibcoems::DestinationType; use tibco_ems::TextMessage;
fn main() { let url = "tcp://localhost:7222"; let user="admin"; let password="admin";
let connection = tibcoems::connect(url.tostring(),user.tostring(),password.tostring());
let session = tibco_ems::session(connection);
let msg = TextMessage{body:"hallo welt".to_string(),header: None};
let destination = Destination{ destinationtype: DestinationType::Queue, destinationname: "myqueue".tostring(), }; tibcoems::sendtextmessage(session, destination, msg);
tibcoems::sessionclose(session); } ```
More example are in the examples directory.