SlideShare a Scribd company logo
1 of 63
High Performance Messaging
Application Development with
Oracle Advanced Queuing
Jeffrey M. Jacobs
Senior Data Architect, PayPal
Copyright 2012, Jeffrey M. Jacobs
Qualifications(?)
• Two centuries experience with Oracle
• Extensive consulting and training experience
• Now FT Senior Site Data Architect with PayPal
Copyright 2012, Jeffrey M. Jacobs
Disclaimer
• All content is responsibility of author who is neither infallible
nor omniscient
• This presentation is not about PayPal’s use of messaging
technology
• Paper and revised slides will be available at
www.jeffreyjacobs.com after conference (permanently)
Copyright 2012, Jeffrey M. Jacobs
Survey Says
• Developers
• DBA
• Architect
• Manager
• Generally familiar with messaging concepts
Copyright 2012, Jeffrey M. Jacobs
Agenda
• Features and Capabilities
• Fundamental Concepts
• Creating Queue Tables
• RAC considerations
• Creating Queues
• Queuing techniques
• AQ Management
• Managing Error Queues
• Managing Propagation
• Dequeuing Performance
Tips
Copyright 2012, Jeffrey M. Jacobs
What is “Messaging”
• Messaging is the ability to send a message containing data
from one application/process to another application/process
• Generally asynchronous
– Oracle AQ does not support synchronous messaging
• Uses include:
– Distributed applications
– Batch processing
– Deferred processing
– Replication (Oracle Streams, “custom” replication)
– Many more (extensively used in EBS)
Copyright 2012, Jeffrey M. Jacobs
Terminology
• Message
– Data sent from one process to one or more other
processes (includes both payload and appropriate delivery
information)
• Producer
– A process that enqueues a message
• Any process with appropriate privileges can enqueue
• Consumer(s)
– The recipient(s) of a message
– When all Consumers have dequeued/consumed a
message, the message is removed from the queue
Copyright 2012, Jeffrey M. Jacobs
Basic Messaging (FIFO)
Application A
(producer)
“Take Order”
Application
B (consumer
and
producer)
“Fullfill
Order”
Queue 1
message
message
message
message
enqueue
dequeue
Queue 2
message
message
message
message
enqueue
Copyright 2012, Jeffrey M. Jacobs
Terminology
• Payload
– The data part of a message
• Subscribers – named applications that have been declared as
consumers for a queue (only for multi-consumer queues)
• Browsing
– AQ provides the ability to examine messages in the queue
without consuming them
• Transaction
– An Oracle transaction
Copyright 2012, Jeffrey M. Jacobs
Oracle AQ Features
• Provides all common messaging capabilities
– Point to point
– Publish and Subscribe (aka multi-point)
• Multicast– msg sent to receivers known by producer
• Broadcast – Producer does not know recipients,
consumers dynamically subscribe to queue
• Error handling
• Timeouts
• History
• Options for dequeuing (not just FIFO)
Copyright 2012, Jeffrey M. Jacobs
More Features
• Message grouping
• Propagation
– Other Oracle databases via dblink
– Pushing messages to external queues
• JMS, middleware and gateways
• Persistent messages and meta-data
– Guaranteed operations
• Lightweight, non-persistent, non-guaranteed “buffered”
messages
• Very high performance
Copyright 2012, Jeffrey M. Jacobs
More Features
• API’s for all operations, both PL/SQL and Java
– DBMS_AQADM, DBMS_AQ
• AQ tables are accessible via SQL for monitoring
– Query only; DML will damage operations
• Multiple payload types
– Abstract Data Types
• Definition must exist in all databases if propagating
– XML
– Raw, CLOB, BLOB, BFILE
– anydata
Copyright 2012, Jeffrey M. Jacobs
More Features
• Content-base routing
• Wait/listen for available message on multiple queues
• Notifications via email
Copyright 2012, Jeffrey M. Jacobs
Queue Types
• “Single consumer” queues
– Messages are dequeued by only one consumer
– Message is removed when dequeued
– Multiple consumers may access queue, but a given
message is only read by one consumer
• E.g. multiple jobs accessing queue
– Fastest
– Multiple producers may enqueue messages
– Simpler underlying structure
Copyright 2012, Jeffrey M. Jacobs
Single Consumer Queue, 1 “Instance” Consumes 1 Message
Application
A (producer)
“Online
Order”
Application C
“Fulfill Order”
Queue 1
message
message
message
message
enqueue
dequeueApplication B
(producer)
“Offline
Order”
enqueue
Application C
Instance 2
Application C
Instance 1
Application C
Instance 3
Copyright 2012, Jeffrey M. Jacobs
Queue Types
• Multi-consumer queues
– Messages are read/dequeued by multiple consumers
– Messages remain in queue until read by all consumers (or
it expires)
Copyright 2012, Jeffrey M. Jacobs
Multi-Consumer Queue, 3 Consumers
Application
A (producer)
“Online
Order”
Queue 1
message
message
message
message
enqueue dequeue
Application
B (producer)
“Offline
Order”
enqueue Application D “Billing”
Application C “Fulfill Order”
Application E “Send Email
Receipt”
dequeue
dequeue
Copyright 2012, Jeffrey M. Jacobs
Multi-consumer Queues
• Two types
– Multicast
• Message recipients are designated by name
• Usually propagated to queues in other databases
• Those queues may be single or multi-consumer
– Broadcast
• Consumers (“subscribers”) are dynamic
– More tables, more overhead
Copyright 2012, Jeffrey M. Jacobs
Buffered Messaging
• Light weight, non-persistent
– Not guaranteed
• Single message only, no grouping
Copyright 2012, Jeffrey M. Jacobs
Message States
• Ready – message is available to be dequeued
• Waiting – availability for dequeuing is delayed
• Expired – message has timed out or exceeded retry count
and been moved to an exception queue
– The reason can be determined by examining the retry
count in the exception queue
• Processed – message has been consumed by all consumers
Copyright 2012, Jeffrey M. Jacobs
Advanced Queuing (AQ) Tables
• Data structure for queues
• AQ Table is an “abstraction”, not a true Oracle table
• Two basic types of AQ table
– Single consumer
• All queues are single consumer
• Creates a single Oracle table
– Multiple consumer
• Queues may have multiple consumers
• Creates multiple Oracle heap and IOT tables
• Managed by AQ monitor/service
Copyright 2012, Jeffrey M. Jacobs
AQ Table Structures
• Multi-consumer AQ table creates multiple (7) Oracle tables
– Main table with data has same name as specified in
CREATE_QUEUE_TABLE, e.g. ORDERS_QUEUETABLE
– Other tables have name beginning with AQ$, e.g.
AQ$_ORDERS_QUEUETABLE_H
• Single consumer AQ table creates single table with main table
name
Copyright 2012, Jeffrey M. Jacobs
Creating AQ Tables
DBMS_AQADM.CREATE_QUEUE_TABLE(
queue_table IN VARCHAR2,
queue_payload_type IN VARCHAR2,
[storage_clause IN VARCHAR2 DEFAULT NULL,]
sort_list IN VARCHAR2 DEFAULT NULL,
multiple_consumers IN BOOLEAN DEFAULT FALSE,
message_grouping IN BINARY_INTEGER DEFAULT NONE,
comment IN VARCHAR2 DEFAULT NULL,
primary_instance IN BINARY_INTEGER DEFAULT 0,
secondary_instance IN BINARY_INTEGER DEFAULT 0,
compatible IN VARCHAR2 DEFAULT NULL,
secure IN BOOLEAN DEFAULT FALSE);
Copyright 2012, Jeffrey M. Jacobs
Parameters
• queue_table – AQ table name
• queue_payload_type – payload type
• storage_clause – any valid storage clause
– Only tablespace needed
– Oracle recommends ASSM
• If not ASSM, may (rarely) need to modify INITRANS or
PCTFREE
• sort_list – determines the order in which messages are
dequeued
– Applies to all queues
– Cannot be changed after creation
Copyright 2012, Jeffrey M. Jacobs
Parameters
• multiple_consumers – ‘TRUE’ or ‘FALSE’
• message_grouping – ‘NONE’ or ‘TRANSACTIONAL’
– ‘TRANSACTIONAL’ – all messages enqueued in one
transaction may be treated as a group when dequeuing
• comment – description of queue table (stored in data
dictionary)
• primary_instance – primary owner of the queue table
service (RAC)
• secondary_instance – secondary owner of the queue
table service (RAC)
Copyright 2012, Jeffrey M. Jacobs
Parameters
• compatible – lowest database version compatibility.
• secure – ‘TRUE’ for secure queues (beyond scope)
Copyright 2012, Jeffrey M. Jacobs
RAC Considerations
• Each AQ table effectively creates a (pseudo-)service
• AQ table structures are typically hot tables with potential hot
block instance
• primary_instance - specifies the preferred instance on
which the service runs (aka the “owner”)
– Effectively specifies node affinity for all queue operations
associated with AQ table
• secondary_instance - specifies the preferred instance if
primary instance is not available
• If neither is available, “random” choice for instance
Copyright 2012, Jeffrey M. Jacobs
Creating Queues
DBMS_AQADM.CREATE_QUEUE (
queue_name IN VARCHAR2,
queue_table IN VARCHAR2,
queue_type IN BINARY_INTEGER DEFAULT NORMAL_QUEUE,
max_retries IN NUMBER DEFAULT NULL,
retry_delay IN NUMBER DEFAULT 0,
retention_time IN NUMBER DEFAULT 0,
dependency_tracking IN BOOLEAN DEFAULT FALSE,
comment IN VARCHAR2 DEFAULT NULL,
auto_commit IN BOOLEAN DEFAULT TRUE);
Copyright 2012, Jeffrey M. Jacobs
Creating Queues
• queue_name – name of the queue
• queue_table – name of table holding queue
• queue_type – NORMAL_QUEUE or EXCEPTION_QUEUE
• max_retries – max number of dequeue retries (rollbacks)
before moving to exception queue
• retry_delay – after failure, delay before msg can be dequeued
again
• retention_time – time in which msg remains in the queue
table after dequeuing
• dependency_tracking - not currently implemented
• comment – documentation (in data dictionary)
• auto_commit - deprecated
Copyright 2012, Jeffrey M. Jacobs
Adding Subscribers
DBMS_AQADM.ADD_SUBSCRIBER (
queue_name IN VARCHAR2,
subscriber IN sys.aq$_agent,
rule IN VARCHAR2 DEFAULT NULL,
transformation IN VARCHAR2 DEFAULT NULL
queue_to_queue IN BOOLEAN DEFAULT FALSE,
delivery_mode IN PLS_INTEGER DEFAULT
DBMS_AQADM.PERSISTENT);
Copyright 2012, Jeffrey M. Jacobs
Parameters
• queue_name – name of the queue
• Subscriber(sys.aq$_agent) – name, address and
protocol of the subscriber
• rule – rule determines if message is to be processed by
subscriber (beyond scope)
• transformation – specifies a transformation to be
applied to message (beyond scope)
• queue_to_queue – used for propagation via dblink;
subscriber may dequeue from local queue
• delivery_mode – delivery may be persistent or buffered
Copyright 2012, Jeffrey M. Jacobs
Enqueue Options and Features
• Enqueue single message
• Enqueue an array of messages (PL/SQL or OCI)
• Message Grouping
• Sender Identification
• Time Specification and Scheduling
• Correlation Identifier
Copyright 2012, Jeffrey M. Jacobs
Enqueuing Messages (note record types)
DBMS_AQ.ENQUEUE(
queue_name IN VARCHAR2,
enqueue_options IN enqueue_options_t,
message_properties IN message_properties_t,
payload IN "type_name",
msgid OUT RAW);
Copyright 2012, Jeffrey M. Jacobs
DBMS_AQ. ENQUEUE_OPTIONS_T
TYPE SYS.ENQUEUE_OPTIONS_T IS RECORD (
visibility BINARY_INTEGER DEFAULT ON_COMMIT,
relative_msgid RAW(16) DEFAULT NULL,
sequence_deviation BINARY_INTEGER DEFAULT NULL,
transformation VARCHAR2(61) DEFAULT NULL,
delivery_mode PLS_INTEGER NOT NULL DEFAULT
PERSISTENT);
Copyright 2012, Jeffrey M. Jacobs
Enqueue Options
• queue_name – the name of the queue
• enqueue_options_t – PL/SQL type
– visibility
• ‘ON_COMMIT’ (default) – enqueue is part of
transaction, added on COMMIT
• ‘IMMEDIATE’ – added as part of autonomous
transaction
– transformation
• Specifies a transformation function to be performed
before enqueuing
Copyright 2012, Jeffrey M. Jacobs
enqueue_options_t
– delivery_mode
• ‘PERSISTENT’ (default)
• ‘BUFFERED’
– The sequence deviation feature is deprecated as of 10.2
• relative_msg_id – effectively deprecated
• sequence_deviation – effectively deprecated
Copyright 2012, Jeffrey M. Jacobs
DBMS_AQ. message_properties_t
TYPE message_properties_t IS RECORD (
priority BINARY_INTEGER NOT NULL DEFAULT 1,
delay BINARY_INTEGER NOT NULL DEFAULT NO_DELAY,
expiration BINARY_INTEGER NOT NULL DEFAULT NEVER,
correlation VARCHAR2(128) DEFAULT NULL,
attempts BINARY_INTEGER,
recipient_list AQ$_RECIPIENT_LIST_T,
exception_queue VARCHAR2(61) DEFAULT NULL,
enqueue_time DATE,
state BINARY_INTEGER,
sender_id SYS.AQ$_AGENT DEFAULT NULL,
original_msgid RAW(16) DEFAULT NULL,
signature aq$_sig_prop DEFAULT NULL,
transaction_group VARCHAR2(30) DEFAULT NULL,
user_property SYS.ANYDATA DEFAULT NULL
delivery_mode PLS_INTEGER NOT NULL DEFAULT
DBMS_AQ.PERSISTENT);
Copyright 2012, Jeffrey M. Jacobs
Relevant ENQUEUE Attributes
• priority – priority of message. Smaller number = higher
priority, may be negative
• delay – specifies number of seconds before msg is available
for dequeue. Default is 0 (NO_DELAY)
• expiration – number of seconds msg is available for
dequeuing (after delay)
– Generally necessary for multi-consumer queues, as not all
subscribers may be able to dequeue msg. Default is
NEVER.
• delivery_mode - DBMS_AQ.BUFFERED or
DBMS_AQ.PERSISTENT.
Copyright 2012, Jeffrey M. Jacobs
More ENQUEUE attributes
• correlation - correlation id for dequeuing by correlation
id
– correlation allows multiple messages to be logically
grouped by an id and dequeued as a group
– Unlike transaction group, need not be enqueued in a single
transaction
– Multiple producers may enqueue messages with same
correlation id
Copyright 2012, Jeffrey M. Jacobs
Dequeuing Features
• Concurrent dequeues
• Multiple dequeue methods and options
• Array dequeue
• Message states
• Message navigation
• Wait for messages
• Retries with delays
• Transaction protection
• Exception queues
Copyright 2012, Jeffrey M. Jacobs
Dequeuing Messages (note record types)
DBMS_AQ.DEQUEUE(
queue_name IN VARCHAR2,
dequeue_options IN dequeue_options_t,
message_properties OUT message_properties_t,
payload OUT "type_name",
msgid OUT RAW);
Copyright 2012, Jeffrey M. Jacobs
DEQUEUE_OPTION_T
TYPE DEQUEUE_OPTIONS_T IS RECORD (
consumer_name VARCHAR2(30) DEFAULT NULL,
dequeue_mode BINARY_INTEGER DEFAULT REMOVE,
navigation BINARY_INTEGER DEFAULT NEXT_MESSAGE,
visibility BINARY_INTEGER DEFAULT ON_COMMIT,
wait BINARY_INTEGER DEFAULT FOREVER,
msgid RAW(16) DEFAULT NULL,
correlation VARCHAR2(128) DEFAULT NULL,
deq_condition VARCHAR2(4000) DEFAULT NULL,
signature aq$_sig_prop DEFAULT NULL,
transformation VARCHAR2(61) DEFAULT NULL,
delivery_mode PLS_INTEGER DEFAULT PERSISTENT);
Copyright 2012, Jeffrey M. Jacobs
Dequeue Modes
• REMOVE (with data) – standard dequeue. Message can
remain in table for history based on retention period, but not
eligible for future dequeuing
• REMOVE_NODATA – no data returned, but removed from
queue
– May be used for selective cleanup
• BROWSE – read, but does not actually dequeue
– Remains available for future processing (unless dequeued
by another process)
– Non-repeatable, numerous “gotchas”
Copyright 2012, Jeffrey M. Jacobs
Dequeue Navigation
• Two navigation methods
– FIRST_MESSAGE
– NEXT_MESSAGE
Copyright 2012, Jeffrey M. Jacobs
Dequeue Methods
• Default - simple dequeue of 1st available msgs based on
declared sort order
• Correlation ID – dequeue series of msgs based on
correlation
– Get correlation id from FIRST_MESSAGE
• Creates “snapshot” (effectively a cursor)
• Get additional mg's via NEXT_MESSAGE until exhausted
• Only gets msg's enqueued at time of FIRST_MESSAGE
• May use pattern matching
• Typically needs index added (EBS DBAs take note!)
Copyright 2012, Jeffrey M. Jacobs
More Dequeue Methods
• Transaction group – similar to correlation, but uses
transaction_group set by producer
• When dequeuing individual msgs in transaction_group
– Dequeue 1st msg in group using FIRST_MESSAGE
– Dequeue subsequent mgs using NEXT_MESSAGE
• Faster to use DBMS_AQ.DEQUEUE_ARRAY
– Generally no need to dequeue messages individually
Copyright 2012, Jeffrey M. Jacobs
More DEQUEUE Navigation
• KISS – dequeuing single messages
– No need for FIRST_MESSAGE
– NEXT_MESSAGE is faster
• Fewer SELECTs issued
• Establishes snapshot/cursor for duration of transaction
Copyright 2012, Jeffrey M. Jacobs
Dequeue visibility
• Messages may be dequeued either
– ON_COMMIT (transaction protection)
• Message is removed from queue on COMMIT of
transaction
– IMMEDIATE
• Messages is removed from queue as autonomous
transaction
• Use if application does not have retry capabilities
Copyright 2012, Jeffrey M. Jacobs
Transaction Protection (visibility)
• With transaction protection, dequeue operation is considered
part of transaction, same as INSERT, UPDATE, DELETE
• Transaction failure leaves message in queue
– ROLLBACK increments retry count
– If retry count exceeded, msg is moved to exception queue
– Killing session, abort shutdown, etc. do not increment
retry count
• Only useful if application has retry capabilities
Copyright 2012, Jeffrey M. Jacobs
Retries with Delays
• After failure, a delay may be specified
– Message placed in WAITING state for specified duration
Copyright 2012, Jeffrey M. Jacobs
Message Expiration
• If expiration is specified in
message_properties_t.expiration
– All consumers must dequeue msg before expiration
– Otherwise, msg is moved to an exception queue
• If multi-consumer queue, expiration is generally good practice
– Consumers may or may not be active
Copyright 2012, Jeffrey M. Jacobs
• A consumer may wait for messages
– DEQUEUE operation wait parameter to wait on specific
queue when no message available to dequeue
• FOREVER – waits forever, default
– best for high frequency queues
• NO_WAIT – don’t wait
• Number –wait time in seconds
• Message is dequeued on wake up
– LISTEN operation to wait on multiple queues
• Returns name of queue with message
Waiting for Messages
Copyright 2012, Jeffrey M. Jacobs
Exception Queues
• Each AQ table has at least one exception queue which
contains messages that have expired or exceeded retry count
from all of the other queues
• Messages in exception queues may be dequeued once by only
one consumer for reprocessing
Copyright 2012, Jeffrey M. Jacobs
Propagation
• Messages may be pushed to other queues via propagation
• Specify destination queues, typically in other database (via
dblink)
– Specify propagation schedule
– Occurs via scheduled jobs (managed by AQ)
• Message properties become subject to all specifications of
destination queue
Copyright 2012, Jeffrey M. Jacobs
Propagation
• Messages may be “fanned” out to multiple queues
• Messages may be “combined” from multiple propagators into
a single queue
• Destination queue must be of same payload type
Copyright 2012, Jeffrey M. Jacobs
Fan In, Fan Out Propagation
Queue 1
message
message
message
message
Queue 2
message
message
message
message
Queue 3
message
message
message
message
Queue 4
message
message
message
message
Queue 5
message
message
message
message
Copyright 2012, Jeffrey M. Jacobs
Propagation APIs
• ALTER_PROPAGATION_SCHEDULE
• DISABLE_PROPAGATION_SCHEDULE
• ENABLE_PROPAGATION_SCHEDULE
• SCHEDULE_PROPAGATION
• VERIFY_QUEUE_TYPES
Copyright 2012, Jeffrey M. Jacobs
Performance Tips for Dequeuing (EBS DBAs!)
• May need to add additional indexes on main queue table, e.g.
CORRID
– May need to generate statistics (or plan outline/baseline)
on added indexes to change plan
– Due to volatility of queue, statistics usually need to be
generated manually
• Hand crafted
• Generate in dev environment (enqueue without
dequeue)
– Import statistics
– Lock statistics (avoid auto stats gathering)
Copyright 2012, Jeffrey M. Jacobs
Query to be Tuned
• Search for queries with following pattern
SELECT /*+ FIRST_ROWS(1) */
tab.ROWID,
…
tab.user_data
FROM <queue_table_name>
WHERE q_name = :1 AND (state = :2 and …
ORDER BY q_name, …
FOR UPDATE SKIP LOCKED;
Copyright 2012, Jeffrey M. Jacobs
FOR UPDATED SKIP LOCKED
• Previously undocumented feature
– Secret sauce for AQ
– Non-blocking SELECT FOR UPDATE
– Only selects rows that are not currently locked
• New messages
• Only lock rows when fetched (unconfirmed)
Copyright 2012, Jeffrey M. Jacobs
More Stuff
• AQ manages space, performs COALESCE
– May be performed manually
• AQ can propagate messages via external protocols and
gateways
• AQ can be accessed via SOAP
• AQ can retain the entire history of a message for non-
repudiation, logging, etc.
Copyright 2012, Jeffrey M. Jacobs
Summary
• Oracle Advance Queuing provide a full featured messaging
platform, supporting all common and desired asynchronous
messaging capabilities
Copyright 2012, Jeffrey M. Jacobs
See also!
• CON8378 - New JMS/Oracle Advanced Queuing Best Practices
for the Latest Generation of Database Technology
• Tuesday, Oct 2, 5:00 PM - 6:00 PM - Moscone South - 310
Copyright 2012, Jeffrey M. Jacobs

More Related Content

What's hot

Weblogic configuration
Weblogic configurationWeblogic configuration
Weblogic configurationAditya Bhuyan
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesArun Gupta
 
WebSphere Application Server Family (Editions Comparison)
WebSphere Application Server Family (Editions Comparison)WebSphere Application Server Family (Editions Comparison)
WebSphere Application Server Family (Editions Comparison)ejlp12
 
Java API for XML Web Services (JAX-WS)
Java API for XML Web Services (JAX-WS)Java API for XML Web Services (JAX-WS)
Java API for XML Web Services (JAX-WS)Peter R. Egli
 
Introduction to MySQL - Part 1
Introduction to MySQL - Part 1Introduction to MySQL - Part 1
Introduction to MySQL - Part 1webhostingguy
 
Syer Monitoring Integration And Batch
Syer Monitoring Integration And BatchSyer Monitoring Integration And Batch
Syer Monitoring Integration And BatchDave Syer
 
Exchange 2013 Architecture Details
Exchange 2013 Architecture DetailsExchange 2013 Architecture Details
Exchange 2013 Architecture DetailsHuy Phạm
 
Unit 5-jdbc2
Unit 5-jdbc2Unit 5-jdbc2
Unit 5-jdbc2msafad
 

What's hot (16)

Weblogic configuration
Weblogic configurationWeblogic configuration
Weblogic configuration
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
 
Day2
Day2Day2
Day2
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
 
Day6
Day6Day6
Day6
 
WebSphere Application Server Family (Editions Comparison)
WebSphere Application Server Family (Editions Comparison)WebSphere Application Server Family (Editions Comparison)
WebSphere Application Server Family (Editions Comparison)
 
Java ee introduction
Java ee introductionJava ee introduction
Java ee introduction
 
Java API for XML Web Services (JAX-WS)
Java API for XML Web Services (JAX-WS)Java API for XML Web Services (JAX-WS)
Java API for XML Web Services (JAX-WS)
 
oracle-osb
oracle-osboracle-osb
oracle-osb
 
Day5
Day5Day5
Day5
 
Introduction to MySQL - Part 1
Introduction to MySQL - Part 1Introduction to MySQL - Part 1
Introduction to MySQL - Part 1
 
Syer Monitoring Integration And Batch
Syer Monitoring Integration And BatchSyer Monitoring Integration And Batch
Syer Monitoring Integration And Batch
 
Jdbc drivers
Jdbc driversJdbc drivers
Jdbc drivers
 
Exchange 2013 Architecture Details
Exchange 2013 Architecture DetailsExchange 2013 Architecture Details
Exchange 2013 Architecture Details
 
Mule data weave
Mule data weaveMule data weave
Mule data weave
 
Unit 5-jdbc2
Unit 5-jdbc2Unit 5-jdbc2
Unit 5-jdbc2
 

Viewers also liked

Oracle streams-step-by-step-ppt
Oracle streams-step-by-step-pptOracle streams-step-by-step-ppt
Oracle streams-step-by-step-pptabderrazak jouini
 
Developing High Class UML Class Models
Developing High Class UML Class ModelsDeveloping High Class UML Class Models
Developing High Class UML Class ModelsJeff Jacobs
 
Best Practices for Oracle Exadata and the Oracle Optimizer
Best Practices for Oracle Exadata and the Oracle OptimizerBest Practices for Oracle Exadata and the Oracle Optimizer
Best Practices for Oracle Exadata and the Oracle OptimizerEdgar Alejandro Villegas
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jmsSridhar Reddy
 
WebLogic JMS System Best Practices
WebLogic JMS System Best PracticesWebLogic JMS System Best Practices
WebLogic JMS System Best PracticesTrivadis
 
AMIS SIG - Introducing Apache Kafka - Scalable, reliable Event Bus & Message ...
AMIS SIG - Introducing Apache Kafka - Scalable, reliable Event Bus & Message ...AMIS SIG - Introducing Apache Kafka - Scalable, reliable Event Bus & Message ...
AMIS SIG - Introducing Apache Kafka - Scalable, reliable Event Bus & Message ...Lucas Jellema
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsJames Bayer
 

Viewers also liked (7)

Oracle streams-step-by-step-ppt
Oracle streams-step-by-step-pptOracle streams-step-by-step-ppt
Oracle streams-step-by-step-ppt
 
Developing High Class UML Class Models
Developing High Class UML Class ModelsDeveloping High Class UML Class Models
Developing High Class UML Class Models
 
Best Practices for Oracle Exadata and the Oracle Optimizer
Best Practices for Oracle Exadata and the Oracle OptimizerBest Practices for Oracle Exadata and the Oracle Optimizer
Best Practices for Oracle Exadata and the Oracle Optimizer
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jms
 
WebLogic JMS System Best Practices
WebLogic JMS System Best PracticesWebLogic JMS System Best Practices
WebLogic JMS System Best Practices
 
AMIS SIG - Introducing Apache Kafka - Scalable, reliable Event Bus & Message ...
AMIS SIG - Introducing Apache Kafka - Scalable, reliable Event Bus & Message ...AMIS SIG - Introducing Apache Kafka - Scalable, reliable Event Bus & Message ...
AMIS SIG - Introducing Apache Kafka - Scalable, reliable Event Bus & Message ...
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic Concepts
 

Similar to High Performance Messaging with Oracle Advanced Queuing

Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile appsMugunth Kumar
 
Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Mydbops
 
1java Introduction
1java Introduction1java Introduction
1java IntroductionAdil Jafri
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsTeamstudio
 
Data Handning with Sqlite for Android
Data Handning with Sqlite for AndroidData Handning with Sqlite for Android
Data Handning with Sqlite for AndroidJakir Hossain
 
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)Kevin Sutter
 
Tackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy ApplicationsTackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy ApplicationsKonveyor Community
 
The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012Lucas Jellema
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database DesignAndrei Solntsev
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesAndrew Ferrier
 
Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) K...
Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) K...Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) K...
Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) K...confluent
 
SQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveSQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveIBM Cloud Data Services
 
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...Insight Technology, Inc.
 
SQL PPT.pptx
SQL PPT.pptxSQL PPT.pptx
SQL PPT.pptxKulbir4
 
Whats new in Oracle Database 12c release 12.1.0.2
Whats new in Oracle Database 12c release 12.1.0.2Whats new in Oracle Database 12c release 12.1.0.2
Whats new in Oracle Database 12c release 12.1.0.2Connor McDonald
 
Azure Cloud Patterns
Azure Cloud PatternsAzure Cloud Patterns
Azure Cloud PatternsTamir Dresher
 
Building a Web Application with Kafka as your Database
Building a Web Application with Kafka as your DatabaseBuilding a Web Application with Kafka as your Database
Building a Web Application with Kafka as your Databaseconfluent
 
Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]shuwutong
 

Similar to High Performance Messaging with Oracle Advanced Queuing (20)

Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile apps
 
Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops
 
1java Introduction
1java Introduction1java Introduction
1java Introduction
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational Controls
 
Unit 2 oracle9i
Unit 2  oracle9i Unit 2  oracle9i
Unit 2 oracle9i
 
Data Handning with Sqlite for Android
Data Handning with Sqlite for AndroidData Handning with Sqlite for Android
Data Handning with Sqlite for Android
 
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
 
Tackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy ApplicationsTackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy Applications
 
The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012
 
The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...
The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...
The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database Design
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best Practices
 
Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) K...
Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) K...Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) K...
Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) K...
 
SQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveSQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The Move
 
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...
 
SQL PPT.pptx
SQL PPT.pptxSQL PPT.pptx
SQL PPT.pptx
 
Whats new in Oracle Database 12c release 12.1.0.2
Whats new in Oracle Database 12c release 12.1.0.2Whats new in Oracle Database 12c release 12.1.0.2
Whats new in Oracle Database 12c release 12.1.0.2
 
Azure Cloud Patterns
Azure Cloud PatternsAzure Cloud Patterns
Azure Cloud Patterns
 
Building a Web Application with Kafka as your Database
Building a Web Application with Kafka as your DatabaseBuilding a Web Application with Kafka as your Database
Building a Web Application with Kafka as your Database
 
Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]
 

Recently uploaded

Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 

Recently uploaded (20)

Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 

High Performance Messaging with Oracle Advanced Queuing

  • 1. High Performance Messaging Application Development with Oracle Advanced Queuing Jeffrey M. Jacobs Senior Data Architect, PayPal Copyright 2012, Jeffrey M. Jacobs
  • 2. Qualifications(?) • Two centuries experience with Oracle • Extensive consulting and training experience • Now FT Senior Site Data Architect with PayPal Copyright 2012, Jeffrey M. Jacobs
  • 3. Disclaimer • All content is responsibility of author who is neither infallible nor omniscient • This presentation is not about PayPal’s use of messaging technology • Paper and revised slides will be available at www.jeffreyjacobs.com after conference (permanently) Copyright 2012, Jeffrey M. Jacobs
  • 4. Survey Says • Developers • DBA • Architect • Manager • Generally familiar with messaging concepts Copyright 2012, Jeffrey M. Jacobs
  • 5. Agenda • Features and Capabilities • Fundamental Concepts • Creating Queue Tables • RAC considerations • Creating Queues • Queuing techniques • AQ Management • Managing Error Queues • Managing Propagation • Dequeuing Performance Tips Copyright 2012, Jeffrey M. Jacobs
  • 6. What is “Messaging” • Messaging is the ability to send a message containing data from one application/process to another application/process • Generally asynchronous – Oracle AQ does not support synchronous messaging • Uses include: – Distributed applications – Batch processing – Deferred processing – Replication (Oracle Streams, “custom” replication) – Many more (extensively used in EBS) Copyright 2012, Jeffrey M. Jacobs
  • 7. Terminology • Message – Data sent from one process to one or more other processes (includes both payload and appropriate delivery information) • Producer – A process that enqueues a message • Any process with appropriate privileges can enqueue • Consumer(s) – The recipient(s) of a message – When all Consumers have dequeued/consumed a message, the message is removed from the queue Copyright 2012, Jeffrey M. Jacobs
  • 8. Basic Messaging (FIFO) Application A (producer) “Take Order” Application B (consumer and producer) “Fullfill Order” Queue 1 message message message message enqueue dequeue Queue 2 message message message message enqueue Copyright 2012, Jeffrey M. Jacobs
  • 9. Terminology • Payload – The data part of a message • Subscribers – named applications that have been declared as consumers for a queue (only for multi-consumer queues) • Browsing – AQ provides the ability to examine messages in the queue without consuming them • Transaction – An Oracle transaction Copyright 2012, Jeffrey M. Jacobs
  • 10. Oracle AQ Features • Provides all common messaging capabilities – Point to point – Publish and Subscribe (aka multi-point) • Multicast– msg sent to receivers known by producer • Broadcast – Producer does not know recipients, consumers dynamically subscribe to queue • Error handling • Timeouts • History • Options for dequeuing (not just FIFO) Copyright 2012, Jeffrey M. Jacobs
  • 11. More Features • Message grouping • Propagation – Other Oracle databases via dblink – Pushing messages to external queues • JMS, middleware and gateways • Persistent messages and meta-data – Guaranteed operations • Lightweight, non-persistent, non-guaranteed “buffered” messages • Very high performance Copyright 2012, Jeffrey M. Jacobs
  • 12. More Features • API’s for all operations, both PL/SQL and Java – DBMS_AQADM, DBMS_AQ • AQ tables are accessible via SQL for monitoring – Query only; DML will damage operations • Multiple payload types – Abstract Data Types • Definition must exist in all databases if propagating – XML – Raw, CLOB, BLOB, BFILE – anydata Copyright 2012, Jeffrey M. Jacobs
  • 13. More Features • Content-base routing • Wait/listen for available message on multiple queues • Notifications via email Copyright 2012, Jeffrey M. Jacobs
  • 14. Queue Types • “Single consumer” queues – Messages are dequeued by only one consumer – Message is removed when dequeued – Multiple consumers may access queue, but a given message is only read by one consumer • E.g. multiple jobs accessing queue – Fastest – Multiple producers may enqueue messages – Simpler underlying structure Copyright 2012, Jeffrey M. Jacobs
  • 15. Single Consumer Queue, 1 “Instance” Consumes 1 Message Application A (producer) “Online Order” Application C “Fulfill Order” Queue 1 message message message message enqueue dequeueApplication B (producer) “Offline Order” enqueue Application C Instance 2 Application C Instance 1 Application C Instance 3 Copyright 2012, Jeffrey M. Jacobs
  • 16. Queue Types • Multi-consumer queues – Messages are read/dequeued by multiple consumers – Messages remain in queue until read by all consumers (or it expires) Copyright 2012, Jeffrey M. Jacobs
  • 17. Multi-Consumer Queue, 3 Consumers Application A (producer) “Online Order” Queue 1 message message message message enqueue dequeue Application B (producer) “Offline Order” enqueue Application D “Billing” Application C “Fulfill Order” Application E “Send Email Receipt” dequeue dequeue Copyright 2012, Jeffrey M. Jacobs
  • 18. Multi-consumer Queues • Two types – Multicast • Message recipients are designated by name • Usually propagated to queues in other databases • Those queues may be single or multi-consumer – Broadcast • Consumers (“subscribers”) are dynamic – More tables, more overhead Copyright 2012, Jeffrey M. Jacobs
  • 19. Buffered Messaging • Light weight, non-persistent – Not guaranteed • Single message only, no grouping Copyright 2012, Jeffrey M. Jacobs
  • 20. Message States • Ready – message is available to be dequeued • Waiting – availability for dequeuing is delayed • Expired – message has timed out or exceeded retry count and been moved to an exception queue – The reason can be determined by examining the retry count in the exception queue • Processed – message has been consumed by all consumers Copyright 2012, Jeffrey M. Jacobs
  • 21. Advanced Queuing (AQ) Tables • Data structure for queues • AQ Table is an “abstraction”, not a true Oracle table • Two basic types of AQ table – Single consumer • All queues are single consumer • Creates a single Oracle table – Multiple consumer • Queues may have multiple consumers • Creates multiple Oracle heap and IOT tables • Managed by AQ monitor/service Copyright 2012, Jeffrey M. Jacobs
  • 22. AQ Table Structures • Multi-consumer AQ table creates multiple (7) Oracle tables – Main table with data has same name as specified in CREATE_QUEUE_TABLE, e.g. ORDERS_QUEUETABLE – Other tables have name beginning with AQ$, e.g. AQ$_ORDERS_QUEUETABLE_H • Single consumer AQ table creates single table with main table name Copyright 2012, Jeffrey M. Jacobs
  • 23. Creating AQ Tables DBMS_AQADM.CREATE_QUEUE_TABLE( queue_table IN VARCHAR2, queue_payload_type IN VARCHAR2, [storage_clause IN VARCHAR2 DEFAULT NULL,] sort_list IN VARCHAR2 DEFAULT NULL, multiple_consumers IN BOOLEAN DEFAULT FALSE, message_grouping IN BINARY_INTEGER DEFAULT NONE, comment IN VARCHAR2 DEFAULT NULL, primary_instance IN BINARY_INTEGER DEFAULT 0, secondary_instance IN BINARY_INTEGER DEFAULT 0, compatible IN VARCHAR2 DEFAULT NULL, secure IN BOOLEAN DEFAULT FALSE); Copyright 2012, Jeffrey M. Jacobs
  • 24. Parameters • queue_table – AQ table name • queue_payload_type – payload type • storage_clause – any valid storage clause – Only tablespace needed – Oracle recommends ASSM • If not ASSM, may (rarely) need to modify INITRANS or PCTFREE • sort_list – determines the order in which messages are dequeued – Applies to all queues – Cannot be changed after creation Copyright 2012, Jeffrey M. Jacobs
  • 25. Parameters • multiple_consumers – ‘TRUE’ or ‘FALSE’ • message_grouping – ‘NONE’ or ‘TRANSACTIONAL’ – ‘TRANSACTIONAL’ – all messages enqueued in one transaction may be treated as a group when dequeuing • comment – description of queue table (stored in data dictionary) • primary_instance – primary owner of the queue table service (RAC) • secondary_instance – secondary owner of the queue table service (RAC) Copyright 2012, Jeffrey M. Jacobs
  • 26. Parameters • compatible – lowest database version compatibility. • secure – ‘TRUE’ for secure queues (beyond scope) Copyright 2012, Jeffrey M. Jacobs
  • 27. RAC Considerations • Each AQ table effectively creates a (pseudo-)service • AQ table structures are typically hot tables with potential hot block instance • primary_instance - specifies the preferred instance on which the service runs (aka the “owner”) – Effectively specifies node affinity for all queue operations associated with AQ table • secondary_instance - specifies the preferred instance if primary instance is not available • If neither is available, “random” choice for instance Copyright 2012, Jeffrey M. Jacobs
  • 28. Creating Queues DBMS_AQADM.CREATE_QUEUE ( queue_name IN VARCHAR2, queue_table IN VARCHAR2, queue_type IN BINARY_INTEGER DEFAULT NORMAL_QUEUE, max_retries IN NUMBER DEFAULT NULL, retry_delay IN NUMBER DEFAULT 0, retention_time IN NUMBER DEFAULT 0, dependency_tracking IN BOOLEAN DEFAULT FALSE, comment IN VARCHAR2 DEFAULT NULL, auto_commit IN BOOLEAN DEFAULT TRUE); Copyright 2012, Jeffrey M. Jacobs
  • 29. Creating Queues • queue_name – name of the queue • queue_table – name of table holding queue • queue_type – NORMAL_QUEUE or EXCEPTION_QUEUE • max_retries – max number of dequeue retries (rollbacks) before moving to exception queue • retry_delay – after failure, delay before msg can be dequeued again • retention_time – time in which msg remains in the queue table after dequeuing • dependency_tracking - not currently implemented • comment – documentation (in data dictionary) • auto_commit - deprecated Copyright 2012, Jeffrey M. Jacobs
  • 30. Adding Subscribers DBMS_AQADM.ADD_SUBSCRIBER ( queue_name IN VARCHAR2, subscriber IN sys.aq$_agent, rule IN VARCHAR2 DEFAULT NULL, transformation IN VARCHAR2 DEFAULT NULL queue_to_queue IN BOOLEAN DEFAULT FALSE, delivery_mode IN PLS_INTEGER DEFAULT DBMS_AQADM.PERSISTENT); Copyright 2012, Jeffrey M. Jacobs
  • 31. Parameters • queue_name – name of the queue • Subscriber(sys.aq$_agent) – name, address and protocol of the subscriber • rule – rule determines if message is to be processed by subscriber (beyond scope) • transformation – specifies a transformation to be applied to message (beyond scope) • queue_to_queue – used for propagation via dblink; subscriber may dequeue from local queue • delivery_mode – delivery may be persistent or buffered Copyright 2012, Jeffrey M. Jacobs
  • 32. Enqueue Options and Features • Enqueue single message • Enqueue an array of messages (PL/SQL or OCI) • Message Grouping • Sender Identification • Time Specification and Scheduling • Correlation Identifier Copyright 2012, Jeffrey M. Jacobs
  • 33. Enqueuing Messages (note record types) DBMS_AQ.ENQUEUE( queue_name IN VARCHAR2, enqueue_options IN enqueue_options_t, message_properties IN message_properties_t, payload IN "type_name", msgid OUT RAW); Copyright 2012, Jeffrey M. Jacobs
  • 34. DBMS_AQ. ENQUEUE_OPTIONS_T TYPE SYS.ENQUEUE_OPTIONS_T IS RECORD ( visibility BINARY_INTEGER DEFAULT ON_COMMIT, relative_msgid RAW(16) DEFAULT NULL, sequence_deviation BINARY_INTEGER DEFAULT NULL, transformation VARCHAR2(61) DEFAULT NULL, delivery_mode PLS_INTEGER NOT NULL DEFAULT PERSISTENT); Copyright 2012, Jeffrey M. Jacobs
  • 35. Enqueue Options • queue_name – the name of the queue • enqueue_options_t – PL/SQL type – visibility • ‘ON_COMMIT’ (default) – enqueue is part of transaction, added on COMMIT • ‘IMMEDIATE’ – added as part of autonomous transaction – transformation • Specifies a transformation function to be performed before enqueuing Copyright 2012, Jeffrey M. Jacobs
  • 36. enqueue_options_t – delivery_mode • ‘PERSISTENT’ (default) • ‘BUFFERED’ – The sequence deviation feature is deprecated as of 10.2 • relative_msg_id – effectively deprecated • sequence_deviation – effectively deprecated Copyright 2012, Jeffrey M. Jacobs
  • 37. DBMS_AQ. message_properties_t TYPE message_properties_t IS RECORD ( priority BINARY_INTEGER NOT NULL DEFAULT 1, delay BINARY_INTEGER NOT NULL DEFAULT NO_DELAY, expiration BINARY_INTEGER NOT NULL DEFAULT NEVER, correlation VARCHAR2(128) DEFAULT NULL, attempts BINARY_INTEGER, recipient_list AQ$_RECIPIENT_LIST_T, exception_queue VARCHAR2(61) DEFAULT NULL, enqueue_time DATE, state BINARY_INTEGER, sender_id SYS.AQ$_AGENT DEFAULT NULL, original_msgid RAW(16) DEFAULT NULL, signature aq$_sig_prop DEFAULT NULL, transaction_group VARCHAR2(30) DEFAULT NULL, user_property SYS.ANYDATA DEFAULT NULL delivery_mode PLS_INTEGER NOT NULL DEFAULT DBMS_AQ.PERSISTENT); Copyright 2012, Jeffrey M. Jacobs
  • 38. Relevant ENQUEUE Attributes • priority – priority of message. Smaller number = higher priority, may be negative • delay – specifies number of seconds before msg is available for dequeue. Default is 0 (NO_DELAY) • expiration – number of seconds msg is available for dequeuing (after delay) – Generally necessary for multi-consumer queues, as not all subscribers may be able to dequeue msg. Default is NEVER. • delivery_mode - DBMS_AQ.BUFFERED or DBMS_AQ.PERSISTENT. Copyright 2012, Jeffrey M. Jacobs
  • 39. More ENQUEUE attributes • correlation - correlation id for dequeuing by correlation id – correlation allows multiple messages to be logically grouped by an id and dequeued as a group – Unlike transaction group, need not be enqueued in a single transaction – Multiple producers may enqueue messages with same correlation id Copyright 2012, Jeffrey M. Jacobs
  • 40. Dequeuing Features • Concurrent dequeues • Multiple dequeue methods and options • Array dequeue • Message states • Message navigation • Wait for messages • Retries with delays • Transaction protection • Exception queues Copyright 2012, Jeffrey M. Jacobs
  • 41. Dequeuing Messages (note record types) DBMS_AQ.DEQUEUE( queue_name IN VARCHAR2, dequeue_options IN dequeue_options_t, message_properties OUT message_properties_t, payload OUT "type_name", msgid OUT RAW); Copyright 2012, Jeffrey M. Jacobs
  • 42. DEQUEUE_OPTION_T TYPE DEQUEUE_OPTIONS_T IS RECORD ( consumer_name VARCHAR2(30) DEFAULT NULL, dequeue_mode BINARY_INTEGER DEFAULT REMOVE, navigation BINARY_INTEGER DEFAULT NEXT_MESSAGE, visibility BINARY_INTEGER DEFAULT ON_COMMIT, wait BINARY_INTEGER DEFAULT FOREVER, msgid RAW(16) DEFAULT NULL, correlation VARCHAR2(128) DEFAULT NULL, deq_condition VARCHAR2(4000) DEFAULT NULL, signature aq$_sig_prop DEFAULT NULL, transformation VARCHAR2(61) DEFAULT NULL, delivery_mode PLS_INTEGER DEFAULT PERSISTENT); Copyright 2012, Jeffrey M. Jacobs
  • 43. Dequeue Modes • REMOVE (with data) – standard dequeue. Message can remain in table for history based on retention period, but not eligible for future dequeuing • REMOVE_NODATA – no data returned, but removed from queue – May be used for selective cleanup • BROWSE – read, but does not actually dequeue – Remains available for future processing (unless dequeued by another process) – Non-repeatable, numerous “gotchas” Copyright 2012, Jeffrey M. Jacobs
  • 44. Dequeue Navigation • Two navigation methods – FIRST_MESSAGE – NEXT_MESSAGE Copyright 2012, Jeffrey M. Jacobs
  • 45. Dequeue Methods • Default - simple dequeue of 1st available msgs based on declared sort order • Correlation ID – dequeue series of msgs based on correlation – Get correlation id from FIRST_MESSAGE • Creates “snapshot” (effectively a cursor) • Get additional mg's via NEXT_MESSAGE until exhausted • Only gets msg's enqueued at time of FIRST_MESSAGE • May use pattern matching • Typically needs index added (EBS DBAs take note!) Copyright 2012, Jeffrey M. Jacobs
  • 46. More Dequeue Methods • Transaction group – similar to correlation, but uses transaction_group set by producer • When dequeuing individual msgs in transaction_group – Dequeue 1st msg in group using FIRST_MESSAGE – Dequeue subsequent mgs using NEXT_MESSAGE • Faster to use DBMS_AQ.DEQUEUE_ARRAY – Generally no need to dequeue messages individually Copyright 2012, Jeffrey M. Jacobs
  • 47. More DEQUEUE Navigation • KISS – dequeuing single messages – No need for FIRST_MESSAGE – NEXT_MESSAGE is faster • Fewer SELECTs issued • Establishes snapshot/cursor for duration of transaction Copyright 2012, Jeffrey M. Jacobs
  • 48. Dequeue visibility • Messages may be dequeued either – ON_COMMIT (transaction protection) • Message is removed from queue on COMMIT of transaction – IMMEDIATE • Messages is removed from queue as autonomous transaction • Use if application does not have retry capabilities Copyright 2012, Jeffrey M. Jacobs
  • 49. Transaction Protection (visibility) • With transaction protection, dequeue operation is considered part of transaction, same as INSERT, UPDATE, DELETE • Transaction failure leaves message in queue – ROLLBACK increments retry count – If retry count exceeded, msg is moved to exception queue – Killing session, abort shutdown, etc. do not increment retry count • Only useful if application has retry capabilities Copyright 2012, Jeffrey M. Jacobs
  • 50. Retries with Delays • After failure, a delay may be specified – Message placed in WAITING state for specified duration Copyright 2012, Jeffrey M. Jacobs
  • 51. Message Expiration • If expiration is specified in message_properties_t.expiration – All consumers must dequeue msg before expiration – Otherwise, msg is moved to an exception queue • If multi-consumer queue, expiration is generally good practice – Consumers may or may not be active Copyright 2012, Jeffrey M. Jacobs
  • 52. • A consumer may wait for messages – DEQUEUE operation wait parameter to wait on specific queue when no message available to dequeue • FOREVER – waits forever, default – best for high frequency queues • NO_WAIT – don’t wait • Number –wait time in seconds • Message is dequeued on wake up – LISTEN operation to wait on multiple queues • Returns name of queue with message Waiting for Messages Copyright 2012, Jeffrey M. Jacobs
  • 53. Exception Queues • Each AQ table has at least one exception queue which contains messages that have expired or exceeded retry count from all of the other queues • Messages in exception queues may be dequeued once by only one consumer for reprocessing Copyright 2012, Jeffrey M. Jacobs
  • 54. Propagation • Messages may be pushed to other queues via propagation • Specify destination queues, typically in other database (via dblink) – Specify propagation schedule – Occurs via scheduled jobs (managed by AQ) • Message properties become subject to all specifications of destination queue Copyright 2012, Jeffrey M. Jacobs
  • 55. Propagation • Messages may be “fanned” out to multiple queues • Messages may be “combined” from multiple propagators into a single queue • Destination queue must be of same payload type Copyright 2012, Jeffrey M. Jacobs
  • 56. Fan In, Fan Out Propagation Queue 1 message message message message Queue 2 message message message message Queue 3 message message message message Queue 4 message message message message Queue 5 message message message message Copyright 2012, Jeffrey M. Jacobs
  • 57. Propagation APIs • ALTER_PROPAGATION_SCHEDULE • DISABLE_PROPAGATION_SCHEDULE • ENABLE_PROPAGATION_SCHEDULE • SCHEDULE_PROPAGATION • VERIFY_QUEUE_TYPES Copyright 2012, Jeffrey M. Jacobs
  • 58. Performance Tips for Dequeuing (EBS DBAs!) • May need to add additional indexes on main queue table, e.g. CORRID – May need to generate statistics (or plan outline/baseline) on added indexes to change plan – Due to volatility of queue, statistics usually need to be generated manually • Hand crafted • Generate in dev environment (enqueue without dequeue) – Import statistics – Lock statistics (avoid auto stats gathering) Copyright 2012, Jeffrey M. Jacobs
  • 59. Query to be Tuned • Search for queries with following pattern SELECT /*+ FIRST_ROWS(1) */ tab.ROWID, … tab.user_data FROM <queue_table_name> WHERE q_name = :1 AND (state = :2 and … ORDER BY q_name, … FOR UPDATE SKIP LOCKED; Copyright 2012, Jeffrey M. Jacobs
  • 60. FOR UPDATED SKIP LOCKED • Previously undocumented feature – Secret sauce for AQ – Non-blocking SELECT FOR UPDATE – Only selects rows that are not currently locked • New messages • Only lock rows when fetched (unconfirmed) Copyright 2012, Jeffrey M. Jacobs
  • 61. More Stuff • AQ manages space, performs COALESCE – May be performed manually • AQ can propagate messages via external protocols and gateways • AQ can be accessed via SOAP • AQ can retain the entire history of a message for non- repudiation, logging, etc. Copyright 2012, Jeffrey M. Jacobs
  • 62. Summary • Oracle Advance Queuing provide a full featured messaging platform, supporting all common and desired asynchronous messaging capabilities Copyright 2012, Jeffrey M. Jacobs
  • 63. See also! • CON8378 - New JMS/Oracle Advanced Queuing Best Practices for the Latest Generation of Database Technology • Tuesday, Oct 2, 5:00 PM - 6:00 PM - Moscone South - 310 Copyright 2012, Jeffrey M. Jacobs