Detailed Description
OCILIB supports Oracle Advanced Queues features
Let's Oracle talk about this features !
- Oracle Queues (from Oracle Streams - Advanced Queuing User's Guide)
Oracle Streams AQ provides database-integrated message queuing functionality. It is built on top of Oracle Streams and leverages the functions of Oracle Database so that messages can be stored persistently, propagated between queues on different computers and databases, and transmitted using Oracle Net Services and HTTP(S). Because Oracle Streams AQ is implemented in database tables, all operational benefits of high availability, scalability, and reliability are also applicable to queue data. Standard database features such as recovery, restart, and security are supported by Oracle Streams AQ. You can use database development and management tools such as Oracle Enterprise Manager to monitor queues. Like other database tables, queue tables can be imported and exported.
- OCILIB implementation
OCILIB provides a (nearly) full C implementation of Advanced Queues available in Oracle OCI and proposes the following datatypes :
- OCI_Msg : Implementation of message to enqueue/dequeue from/to queues
- OCI_Enqueue : Implementation of enqueuing process
- OCI_Dequeue : Implementation of dequeuing process
- OCI_Agent : Implementation of Advanced queues Agents
Note that the only AQ features not supported yet by OCILIB are :
- Payloads of type AnyData
- Enqueuing/dequeuing arrays of messages
- Optionnal delivery mode introduced in 10gR2
OCILIB provides as well a C API to administrate queues and queue tables initially reserved to PL/SQL and Java (wrappers around PL/SQL calls). This API, based on internal PL/SQL calls wrapping the DBMS_AQADM packages procedures, allow the following actions :
- create, alter, drop and purge queue tables (OCI_QueueTableXXX calls)
- create, alter, drop, start, stop queues (OCI_QueueXXX calls)
Note that the user connected to the database needs particular privileges to manipulate or administrate queues (See Oracle Streams - Advanced Queuing User's Guide for more informations on these privileges)
- Example
#include "ocilib.h" int main(int argc, char *argv[]) { OCI_Connection *con; OCI_Enqueue *enq; OCI_Dequeue *deq; OCI_Msg *msg; OCI_TypeInfo *inf; OCI_Object *obj; OCI_Initialize(NULL, NULL, OCI_ENV_DEFAULT); con = OCI_ConnectionCreate("db", "usr", "pwd", OCI_SESSION_DEFAULT); inf = OCI_TypeInfoGet(con, "MY_MESSAGE", OCI_TIF_TYPE); enq = OCI_EnqueueCreate(inf, "my_queue"); deq = OCI_DequeueCreate(inf, "my_queue"); msg = OCI_MsgCreate(inf); obj = OCI_ObjectCreate(con, inf); OCI_ObjectSetString(obj, "TITLE", "NEXT MEETING"); OCI_ObjectSetString(obj, "CONTENT", "12:00 PM IN STARBUCKS"); OCI_MsgSetObject(msg, obj); OCI_EnqueuePut(enq, msg); OCI_MsgFree(msg); OCI_ObjectFree(obj); OCI_Commit(con); msg = OCI_DequeueGet(deq); obj = OCI_MsgGetObject(msg); printf("MSG '%s' => %s\n", OCI_ObjectGetString(obj, "TITLE"), OCI_ObjectGetString(obj, "CONTENT")); OCI_EnqueueFree(enq); OCI_DequeueFree(deq); OCI_ConnectionFree(con); OCI_Cleanup(); return EXIT_SUCCESS; }
The 15 Best Casinos in Las Vegas, NV - Mapyro
답글삭제› casinos › slot-slots › casinos › slot-slots Nov 군산 출장마사지 25, 2021 — Nov 25, 2021 보령 출장마사지 Discover 여주 출장마사지 the best casinos in Las Vegas, NV with Mapyro. Find your lucky corner and explore the world's most famous slot 용인 출장마사지 machines 제주 출장안마 and table games.