09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Posting for Subscriber Notification<br />

Usage Notes<br />

Several subscriptions can be posted to at one time. Posting to a subscription<br />

involves identifying the subscription name and the payload, if desired. It is possible<br />

for no payload to be associated with this call. This call provides a best-effort<br />

guarantee. A notification goes to registered clients at most once.<br />

This call is primarily used for lightweight notification and is useful in the case of<br />

several system events. If an application needs more rigid guarantees, it can use AQ<br />

functionality by enqueuing to a queue.<br />

When using OCI, the user must specify a subscription handle at registration time<br />

with the namespace attribute set to OCI_SUBSCR_NAMESPACE_ANONYMOUS.<br />

When using PL/SQL, the namespace attribute in aq$_post_info must be set to<br />

DBMS_AQ.NAMESPACE_ANONYMOUS.<br />

Related functions: LNOCIAQListen(), OCISvcCtxToLda(),<br />

LNOCISubscriptionEnable(), OCISubscriptionRegister(),<br />

LNOCISubscriptionUnRegister(), dbms_aq.register, dbms_<br />

aq.unregister.<br />

Syntax<br />

See Chapter 3, "AQ Programmatic Environments" for a list of available functions in<br />

each programmatic environment. Use the following syntax references for each<br />

programmatic environment:<br />

PL/SQL (DBMS_AQ Package): POST procedure.<br />

C (OCI): <strong>Oracle</strong> Call Interface Programmer’s Guide LNOCI Programming<br />

<br />

<strong>Advanced</strong> Topics, Publish-Subscribe Notification<br />

Visual Basic (OO4O) (<strong>Oracle</strong> Objects for OLE (OO4O) Online Help): Not<br />

<br />

supported.<br />

Java (JDBC): Not supported.<br />

Examples<br />

See Chapter 3, "AQ Programmatic Environments" for a list of available functions in<br />

each programmatic environment.<br />

PL/SQL (DBMS_AQ Package): Post of Object-Type Messages<br />

-- Register for notification<br />

DECLARE<br />

reginfo sys.aq$_reg_info;<br />

Operational Interface: Basic Operations 11-67

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!