OpenMAMA
publisher.h File Reference

Go to the source code of this file.

Typedefs

typedef void(MAMACALLTYPE * mamaThrottledSendCompleteCb) (mamaPublisher publisher, mamaMsg msg, mama_status status, void *closure)
 Responsible for publishing mama messages. More...
 

Functions

MAMAExpDLL mama_status mamaPublisher_create (mamaPublisher *result, mamaTransport tport, const char *symbol, const char *source, const char *root)
 Create a mama publisher for the corresponding transport. More...
 
MAMAExpDLL mama_status mamaPublisher_send (mamaPublisher publisher, mamaMsg msg)
 Send a message from the specified publisher. More...
 
MAMAExpDLL mama_status mamaPublisher_sendWithThrottle (mamaPublisher publisher, mamaMsg msg, mamaThrottledSendCompleteCb sendCompleteCb, void *closure)
 Send a message with the throttle. More...
 
MAMAExpDLL mama_status mamaPublisher_sendFromInboxWithThrottle (mamaPublisher publisher, mamaInbox inbox, mamaMsg msg, mamaThrottledSendCompleteCb sendCompleteCb, void *closure)
 
MAMAExpDLL mama_status mamaPublisher_sendFromInbox (mamaPublisher publisher, mamaInbox inbox, mamaMsg msg)
 
MAMAExpDLL mama_status mamaPublisher_sendReplyToInboxHandle (mamaPublisher publisher, mamaMsgReply replyAddress, mamaMsg reply)
 Send a reply in response to a request to an inbox. More...
 
MAMAExpDLL mama_status mamaPublisher_sendReplyToInbox (mamaPublisher publisher, mamaMsg request, mamaMsg reply)
 Send a reply in response to a request to an inbox. More...
 
MAMAExpDLL mama_status mamaPublisher_destroy (mamaPublisher publisher)
 Destroy the publisher. More...
 

Typedef Documentation

◆ mamaThrottledSendCompleteCb

typedef void(MAMACALLTYPE * mamaThrottledSendCompleteCb) (mamaPublisher publisher, mamaMsg msg, mama_status status, void *closure)

Responsible for publishing mama messages.

Prototype for callback invoked when a message sent with either mamaPublisher_sendWithThrottle() or mamaPublisher_sendFromInboxWithThrottle() has been sent from the throttle queue.

Messages sent on the throttle queue are no longer destroyed by the API. It is the responsibility of the application developer to manage the lifecycle of any messages sent on the throttle.

Parameters
publisherThe publisher object used to send the message.
msgThe mamaMsg which has been sent from the throttle queue.
statusWhether the message was successfully sent from the throttle. A value of MAMA_STATUS_OK indicates that the send was successful.
closureUser supplied context data.

Function Documentation

◆ mamaPublisher_create()

MAMAExpDLL mama_status mamaPublisher_create ( mamaPublisher result,
mamaTransport  tport,
const char *  symbol,
const char *  source,
const char *  root 
)

Create a mama publisher for the corresponding transport.

If the transport is a marketdata transport, as opposed to a "basic" transport, the topic corresponds to the symbol. For a basic transport, the source and root get ignored.

Parameters
resultA pointer to hold the resulting mamaPublisher.
tportThe transport.
symbolSymbol on which to publish.
sourceThe source for market data publishers. (e.g. source.symbol)
rootThe root for market data publishers. Used internally.

◆ mamaPublisher_send()

MAMAExpDLL mama_status mamaPublisher_send ( mamaPublisher  publisher,
mamaMsg  msg 
)

Send a message from the specified publisher.

Parameters
publisherThe publisher from which to send a message.
msgThe mamaMsg to send.

◆ mamaPublisher_sendWithThrottle()

MAMAExpDLL mama_status mamaPublisher_sendWithThrottle ( mamaPublisher  publisher,
mamaMsg  msg,
mamaThrottledSendCompleteCb  sendCompleteCb,
void *  closure 
)

Send a message with the throttle.

The lifecycle of the message sent is controlled by the user of the API. The callback indicates when the API is no longer using the message and can be destroyed/reused by the application.

Parameters
publisherThe publish from which to send the throttled message.
msgThe mamaMsg to send.
sendCompleteCbCallback invoked once the message has been send on the throttle.
closureUser supplied data returned in the send complete callback.

◆ mamaPublisher_sendFromInboxWithThrottle()

MAMAExpDLL mama_status mamaPublisher_sendFromInboxWithThrottle ( mamaPublisher  publisher,
mamaInbox  inbox,
mamaMsg  msg,
mamaThrottledSendCompleteCb  sendCompleteCb,
void *  closure 
)

◆ mamaPublisher_sendFromInbox()

MAMAExpDLL mama_status mamaPublisher_sendFromInbox ( mamaPublisher  publisher,
mamaInbox  inbox,
mamaMsg  msg 
)

◆ mamaPublisher_sendReplyToInboxHandle()

MAMAExpDLL mama_status mamaPublisher_sendReplyToInboxHandle ( mamaPublisher  publisher,
mamaMsgReply  replyAddress,
mamaMsg  reply 
)

Send a reply in response to a request to an inbox.

Parameters
publisherThe mamaPublisher from which to send the response.
requestThe reply address to which you are responding.
replyThe mamaMsg to be sent as the reply.

◆ mamaPublisher_sendReplyToInbox()

MAMAExpDLL mama_status mamaPublisher_sendReplyToInbox ( mamaPublisher  publisher,
mamaMsg  request,
mamaMsg  reply 
)

Send a reply in response to a request to an inbox.

Parameters
publisherThe mamaPublisher from which to send the response.
requestThe mamaMsg to which you are responding.
replyThe mamaMsg to be sent as the reply.

◆ mamaPublisher_destroy()

MAMAExpDLL mama_status mamaPublisher_destroy ( mamaPublisher  publisher)

Destroy the publisher.

Parameters
publisherThe mamaPublisher to destroy.


© 2012 Linux Foundation