TIBCO FTL®
Public Member Functions | List of all members
TIBCO.FTL.IPublisher Interface Reference

Publisher objects send messages. More...

Inheritance diagram for TIBCO.FTL.IPublisher:

Public Member Functions

void Flush ()
 When the publisher's send policy is non-inline, flush all outsanding messages. More...
 
int GetMaxBatchCount ()
 Returns the maximum batch count of a non-inline publisher. More...
 
int GetSendPolicy ()
 Returns the send policy of a publisher. More...
 
void Send (IMessage message)
 Send a message, one-to-many. More...
 
void Send (IMessage[] messages)
 Send messages (one-to-many) from an array of messages. More...
 
void Send (IMessage[] messages, int count)
 Send a subset of messages from an array of messages. More...
 
void SendReply (IMessage reply, IMessage request)
 Upon receiving a request message, send a reply message to the requester. More...
 
IMessage SendRequest (IMessage request, double timeout)
 Send a request and wait for a reply. More...
 
void SendToInbox (IInbox inbox, IMessage message)
 Send an inbox message to an inbox. More...
 

Detailed Description

Publisher objects send messages.

A publisher object realizes the message-sending functionality of an endpoint within a program.

A publisher object encapsulates all the information that a program needs to send a stream of messages. Publisher objects use the transport and format resources associated with an endpoint (as defined in the realm).

Programs can use a publisher to send messages one-to-many, or one-to-one.

To create a publisher object, call IRealm.CreatePublisher(string). Programs must IDisposable.Dispose publisher objects to reclaim resources.

Customers do not implement this interface.

Member Function Documentation

◆ Flush()

void TIBCO.FTL.IPublisher.Flush ( )

When the publisher's send policy is non-inline, flush all outsanding messages.

When a persistence publisher is configured for non-inline send, calls to IPublisher.Send(IMessage) may return before the message is persisted. Applications may call this function to ensure that all outstanding messages have been persisted (for example, if the application intends to close the publisher). This function blocks until all messages have been persisted, or until a failure occurs. If a failure occurs, this call will raise an exception.

◆ GetMaxBatchCount()

int TIBCO.FTL.IPublisher.GetMaxBatchCount ( )

Returns the maximum batch count of a non-inline publisher.

Returns the maximum batch count that is in effect for this publisher. Applications may use this call to determine appropriate behavior if a non-inline persistence publisher fails to persist a message.

See FTL.PUBLISHER_PROPERTY_INT_MAX_BATCH_COUNT.

Returns
The maximum batch count.

◆ GetSendPolicy()

int TIBCO.FTL.IPublisher.GetSendPolicy ( )

Returns the send policy of a publisher.

Returns the send policy that is in effect for this publisher. Applications may use this call to determine appropriate behavior if a persistence publisher fails to persist a message.

See FTL.PUBLISHER_PROPERTY_INT_SEND_POLICY.

Returns
The send policy.

◆ Send() [1/3]

void TIBCO.FTL.IPublisher.Send ( IMessage  message)

Send a message, one-to-many.

If the administrator has configured publisher mode store_confirm_send for the store, a persistence publisher may block in this call until the message has been persisted. Otherwise the call returns immediately, and the message may or may not be stored.

For persistence publishers, the exact semantics depend on the send policy. See FTL.PUBLISHER_PROPERTY_INT_SEND_POLICY.

Parameters
messageThe method sends this message.

◆ Send() [2/3]

void TIBCO.FTL.IPublisher.Send ( IMessage[]  messages)

Send messages (one-to-many) from an array of messages.

The application sends each message in the array, in order.

Sending an array of messages eliminates the overhead cost of a separate call for each message.

If the administrator has configured publisher mode store_confirm_send for the store, a persistence publisher will block in this call until all messages have been persisted. Otherwise the call returns immediately, and the messages may or may not be stored.

Parameters
messagesThe method sends all the messages from this array.

◆ Send() [3/3]

void TIBCO.FTL.IPublisher.Send ( IMessage[]  messages,
int  count 
)

Send a subset of messages from an array of messages.

The application sends count messages from the array, in order.

Sending an array of messages eliminates the overhead cost of a separate call for each message.

If the administrator has configured publisher mode store_confirm_send for the store, a persistence publisher will block in this call until all messages have been persisted. Otherwise the call returns immediately, and the messages may or may not be stored.

Parameters
messagesThe method sends count messages from this array.
countSupply the number of messages to send.

◆ SendReply()

void TIBCO.FTL.IPublisher.SendReply ( IMessage  reply,
IMessage  request 
)

Upon receiving a request message, send a reply message to the requester.

Parameters
replyThe reply message to send.
requestSend a reply to this inbound request message.

◆ SendRequest()

IMessage TIBCO.FTL.IPublisher.SendRequest ( IMessage  request,
double  timeout 
)

Send a request and wait for a reply.

Parameters
requestThe request message to send.
timeoutThe maximum time (in seconds) to wait for a reply.
Returns
A received reply message.

◆ SendToInbox()

void TIBCO.FTL.IPublisher.SendToInbox ( IInbox  inbox,
IMessage  message 
)

Send an inbox message to an inbox.

Because inbox messages do not trigger the content matchers of other subscribers on the endpoint, they are an efficient way to target a message to a specific destination. For example, you might use an inbox message to query a specific data source, or to reply to a query.

Parameters
inboxThe method sends the message to this inbox.
messageThe method sends this message.
See also
IRealm.CreateInboxSubscriber(string), IMessage.GetInbox(string)