Hermes  0.9.5-beta
Hierarchical Distributed I/O Buffering System
hermes::pubsub Namespace Reference

Functions

hapi::Status mpiInit (int argc, char **argv)
 Helper function to initialize MPI. More...
 
hapi::Status connect (const std::string &config_file)
 Connects to the Hermes instance. More...
 
hapi::Status connect ()
 Connects to the Hermes instance. More...
 
hapi::Status disconnect ()
 Connects from the Hermes instance. More...
 
hapi::Status attach (const std::string &topic)
 Attaches to a topic, creating it if it doesnt exists. More...
 
hapi::Status detach (const std::string &topic)
 Detaches from the topic. Cleaning up all metadata. More...
 
hapi::Status publish (const std::string &topic, const std::vector< unsigned char > &message)
 Puts a message to a topic. More...
 
std::pair< std::vector< unsigned char >, hapi::Status > subscribe (const std::string &topic)
 Retrieves the next message from the topic. More...
 

Detailed Description

Standard header Dependent library headers Internal headers

Function Documentation

◆ mpiInit()

hapi::Status hermes::pubsub::mpiInit ( int  argc,
char **  argv 
)

Helper function to initialize MPI.

Returns
The return code/status

◆ connect() [1/2]

hapi::Status hermes::pubsub::connect ( const std::string &  config_file)

Connects to the Hermes instance.

Parameters
config_filePath to the config file of Hermes
Returns
The return code/status
Here is the caller graph for this function:

◆ connect() [2/2]

hapi::Status hermes::pubsub::connect ( )

Connects to the Hermes instance.

Returns
The return code/status
Precondition
Assumes that the config file path is loaded into a environment variable defined in constants.h under kHermesConf
Here is the call graph for this function:

◆ disconnect()

hapi::Status hermes::pubsub::disconnect ( )

Connects from the Hermes instance.

Returns
The return code/status

◆ attach()

hapi::Status hermes::pubsub::attach ( const std::string &  topic)

Attaches to a topic, creating it if it doesnt exists.

Parameters
topicThe name of the topic
Returns
The return code/status
Here is the caller graph for this function:

◆ detach()

hapi::Status hermes::pubsub::detach ( const std::string &  topic)

Detaches from the topic. Cleaning up all metadata.

Parameters
topicThe name of the topic
Returns
The return code/status
Precondition
Detaching doesnt delete the topic

◆ publish()

hapi::Status hermes::pubsub::publish ( const std::string &  topic,
const std::vector< unsigned char > &  message 
)

Puts a message to a topic.

Parameters
topicThe name of the topic
messagethe data buffer
Returns
The return code/status
Remarks
Using std::vector<unsigned char> as equivalent to Blob
Here is the call graph for this function:

◆ subscribe()

std::pair< hapi::Blob, hapi::Status > hermes::pubsub::subscribe ( const std::string &  topic)

Retrieves the next message from the topic.

Parameters
topicThe name of the topic
Returns
A pair of: the return code/status and, if successful, the subscribed message.
Remarks
Message order is tracked by Hermes. Current message is tracked per-process by a metadata manager
Here is the call graph for this function: