Study guide

7.1 OCI Streaming, OCI Queue & Messaging Patterns for Microservices

OCI 2026 Architect Professional 1Z0-997-26

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Overview & Architecture Foundations

1.1 Exam Logistics, the 2026 Blueprint & How to Use This Guide 1.2 The OCI Well-Architected Framework & Architectural Tradeoffs

2 Chapter 2: High Availability & Resilient Design

2.1 Availability Domains, Fault Domains, Instance Pools & Load Balancers 2.2 OCI DNS Traffic Steering, Geolocation & Health Checks 2.3 Block Volume Replication, Volume Groups & Backup Policies 2.4 Object Storage Replication, Versioning & Retention Rules (WORM)

3 Chapter 3: Full Stack Disaster Recovery

3.1 Full Stack Disaster Recovery: Protection Groups, Members & Permissions 3.2 DR Plans: Switchover, Failover, Prechecks & Plan Execution 3.3 DR Drills, Plan Customization & Operational Readiness

4 Chapter 4: Container Instances, OCIR & OCI DevOps

4.1 Containerization, Microservices & OCI Container Instances 4.2 OCI Container Registry: Repositories, Push & Pull, and Image Management 4.3 OCI DevOps: Code Repositories, Build Pipelines & Deployment Strategies

5 Chapter 5: OCI Kubernetes Engine (OKE)

5.1 OKE Cluster Types, Node Options & Cluster Creation 5.2 OKE Networking: VCN-Native Pod Networking vs. Flannel, Subnet Sizing & Load Balancers 5.3 OKE Workload Identity, Secrets & Persistent Storage

6 Chapter 6: Serverless Functions & API Gateway

6.1 OCI Functions: Concepts, Invocation Modes, Integrations & Image Security 6.2 API Gateway: Authentication, JWT Validation, Rate Limiting & Usage Plans

7 Chapter 7: Messaging & Event-Driven Design

7.1 OCI Streaming, OCI Queue & Messaging Patterns for Microservices 7.2 OCI Events, Event Rules & OCI Notifications Fan-Out

8 Chapter 8: Infrastructure as Code with Terraform & Resource Manager

8.1 Infrastructure as Code with Terraform and the OCI Provider 8.2 OCI Resource Manager: Stacks, Jobs, Drift Detection & Private Endpoints

9 Chapter 9: Identity & Multi-Tenancy Governance

9.1 IAM Policy Design: Verbs, Conditions, Dynamic Groups & Principals 9.2 Organizations Management, Governance Rules & Compartment Quotas

10 Chapter 10: Security Posture with Cloud Guard & Security Zones

10.1 Cloud Guard: Detector Recipes, Problems, Scores & Responders 10.2 Security Zones & Vulnerability Scanning

11 Chapter 11: Secure Access & Network Protection

11.1 Layered Network Security: Security Lists, NSGs & Private Access to Services 11.2 OCI Bastion: Managed SSH, Port Forwarding & SOCKS5 Sessions 11.3 Zero Trust Packet Routing (ZPR): Security Attributes & Intent-Based Policy 11.4 OCI Network Firewall: Policies, Inspection Routing, Tunnel Inspection & Private NAT

12 Chapter 12: Application & Data Protection: WAF, Certificates & Vault

12.1 OCI Web Application Firewall: Policies, Modules, Actions & Enforcement Points 12.2 OCI Certificates: Private CAs, TLS Certificates, Renewal & Integrations 12.3 OCI Vault Key Management: Vault Types, Protection Modes, Dedicated KMS & External KMS 12.4 Vault Secrets: Versions, Rotation States, Automatic Generation & Rotation

13 Chapter 13: Base Database Service & Autonomous AI Database

13.1 Base Database Service: DB Systems, RAC, Data Guard, Cloning & Maintenance 13.2 Autonomous AI Database: Workload Types, Deployment Options, Services & Connectivity 13.3 Operating Autonomous AI Database: Scaling, Cloning, Backups, Patching & Self-Tuning 13.4 Autonomous Data Guard & Backup-Based Disaster Recovery for Autonomous AI Database

14 Chapter 14: Recovery Service, Global Distribution & OCI Cache

14.1 Autonomous Recovery Service: Protection Policies, Real-Time Protection & Retention Lock 14.2 Globally Distributed Autonomous AI Database: Sharding, Data Placement & Replication 14.3 OCI Cache: Valkey and Redis Clusters, Sharding, Security & Cross-Region Replication

15 Chapter 15: Monitoring, Alarms & Notifications

15.1 OCI Monitoring: Metrics, Namespaces, Custom Metrics & Monitoring Query Language 15.2 Alarms & Notifications: Trigger Rules, Absence Alarms, Split Messages, Suppression & Delivery

16 Chapter 16: Logging, Audit, Connector Hub & Search

16.1 OCI Logging: Log Groups, Service Logs, Custom Logs & the Unified Monitoring Agent 16.2 Logging Search, the Logging Query Language & OCI Audit 16.3 Connector Hub: Moving Logs, Metrics, Queue Messages & Streams Between Services 16.4 OCI Search with OpenSearch & Resource Search for Observability

7.1 OCI Streaming, OCI Queue & Messaging Patterns for Microservices

Key Takeaways Explain This Topic AI

OCI Streaming keeps messages for 24 hours to 7 days, and neither the retention period nor the partition count can be changed after the stream is created.

Each Streaming partition supports 1 MB per second of writes and 5 GET requests per second per consumer group, with up to 50 consumer groups per stream.

OCI Queue visibility timeouts range from 1 second to 12 hours (default 30 seconds), and a message moves to the dead letter queue after the configured 1 to 20 delivery attempts.

Streaming's Kafka compatibility does not include Kafka Streams, log compaction, transactions, dynamic partition addition, or idempotent production.

Last updated: October 2026

  • 5.3 OCI Streaming, OCI Queue & Messaging Patterns for Microservices
  • Enterprise Messaging Paradigms: Streams vs. Queues

Distributed enterprise architectures depend heavily on asynchronous messaging to decouple microservices, absorb unpredictable traffic surges, and guarantee data durability. However, cloud architects frequently conflate two fundamentally different messaging paradigms:

Event Streaming (Log-Centric Pub/Sub) : An immutable, distributed, append-only log where continuous sequences of events are written to partitioned streams. Messages are retained independently of consumer activity, enabling multiple independent consumer applications to read, track progress, and replay event history.

Message Queuing (Point-to-Point Task Distribution) : A transient buffer designed to decouple task producers from competing consumer workers. Messages are processed by whichever worker is available and are permanently deleted once acknowledged, with built-in mechanics for retries and dead-letter handling.

On Oracle Cloud Infrastructure, OCI Streaming Service (OSS) addresses the event streaming model, while OCI Queue provides the point-to-point task queue model.

OCI Streaming Service (OSS) Architecture

OCI Streaming is a fully managed, scalable, durable, and highly available real-time event ingestion and streaming platform. It provides a serverless alternative to deploying, patching, and managing self-hosted Apache Kafka clusters. Stream Pool (KMS Encryption, Private VCN Endpoint, Kafka Settings)

  • └── Stream: OrdersStream (Retention: 7 Days)
  • ├── Partition 0 ──[Offset 0, 1, 2, 3...] ──> Consumer A (Group 1)
  • ├── Partition 1 ──[Offset 0, 1, 2, 3...] ──> Consumer B (Group 1)
  • └── Partition 2 ──[Offset 0, 1, 2, 3...] ──> Consumer C (Group 1) & Consumer X (Group 2)
  • Core Structural Components

Stream Pools : A logical grouping and administrative boundary for multiple streams. Stream pools define shared security configurations, including Customer-Managed Encryption Keys (CMEK) via OCI Vault, private endpoint VCN attachment, and Kafka connection settings.

Streams : A partitioned log of messages, created within a stream pool. Retention is set at creation between 24 hours and 7 days and cannot be changed later.

Partitions : The fundamental unit of scalability, throughput, and parallelism in OCI Streaming. Sequential message ordering is strictly guaranteed within a single partition , but ordering is not guaranteed across different partitions.

Message Keys : When producing a message, the producer specifies an optional message key. OCI Streaming hashes the key to assign the message to a specific partition. Messages with identical keys are guaranteed to land on the same partition in sequential order.

Consumer Groups : A coordinated group of consumer instances that divide stream partitions among themselves for parallel message consumption. Each partition is allocated to exactly one consumer within the group. Consumers commit their read offsets back to OCI Streaming, allowing the group to resume processing seamlessly without duplicating records if an instance fails.

Replayability : Reading a message does not delete it. Messages persist until the retention window expires. A consumer group can reset its offset to rewind and replay historical data, and distinct consumer groups can consume the identical stream independently at their own pace.

Limits, Sizing & Apache Kafka Compatibility

OCI Streaming publishes these limits (Oracle's "Limits on Streaming Resources" page):

  • Limit Value
  • Write throughput per partition 1 MB per second (no separate limit on the number of PUT requests)
  • Reads per partition 5 GET requests per second per consumer group
  • Consumer groups per stream Up to 50
  • Maximum message size 1 MB (a single request is also limited to 1 MB)
  • Retention Minimum 24 hours , maximum 7 days
  • Changes after creation Retention and partition count cannot be changed once the stream exists
  • Default tenancy partition limit 200 partitions (Universal Credits) or 50 (Pay As You Go)
  • Sizing Partitions

Because the partition count is fixed when the stream is created, size for peak load plus growth: Partitions ≥ ⌈ Peak write MB/s 1 MB/s per partition ⌉ \text{Partitions} \ge \left\lceil \frac{\text{Peak write MB/s}}{1\ \text{MB/s per partition}} \right\rceil Partitions ≥ ⌈ 1 MB/s per partition Peak write MB/s ​ ⌉

Worked example: an IoT platform writes 10 MB/s at peak and expects 50% growth within a year. It needs at least 10 partitions today and 15 for next year's peak, so creating the stream with 15 partitions avoids recreating it later. Each consumer group reads every partition independently, subject to 5 GET requests per second per partition for that group, so adding a second consuming application means adding a consumer group rather than more partitions.

Apache Kafka Compatibility

Streaming is compatible with most Kafka APIs, so many existing Kafka applications can move without code changes. Oracle lists support for the Kafka Producer, Consumer, Connect, Admin, and Group Management APIs (v0.10 and later). Oracle also lists features that are not implemented :

  • Kafka Streams
  • Log compaction
  • Transactions
  • Dynamic partition addition
  • Idempotent production

Connection details:

Bootstrap server : the regional endpoint on port 9092 , for example streaming.us-phoenix-1.oci.oraclecloud.com:9092 .

Authentication : SASL_SSL with the SASL/PLAIN mechanism. The username has the format {tenancyName}/{username}/{streamPoolId} , and the password is an auth token . The Java SDK can also authenticate with instance principals.

Durability : Streaming supports only lossless Kafka configurations. Data is replicated three ways, and producers receive an acknowledgment only after at least two replicas are in sync.

Kafka Connect : connectors can move data between Streaming and databases or object stores, for example through the JDBC connector.

OCI Queue Architecture & Worker Semantics

OCI Queue is a fully managed, serverless, point-to-point message queuing service built to handle high-throughput, bursty asynchronous task workloads without requiring partition sizing or cluster management. Producer ──> OCI Queue ──> Visibility Timeout (30s) ──> Worker Pool (Competing Consumers)

  • │ │
  • Processing Succeeds Processing Fails 3x
  • │ │
  • DELETE Message Dead-Letter Queue (DLQ)
  • Key Architectural Features

At-Least-Once Delivery : Guarantees that every message is delivered to a consumer at least once. Consumer workers must be designed to be idempotent.

Competing Consumers : Unlike stream partitions where only one consumer in a group reads a partition, all workers in a consumer pool pull from the same queue concurrently. The first available worker claims the next message.

Visibility Timeout : When a worker retrieves a message, OCI Queue hides it from other consumers for the visibility timeout (configurable at the queue from 1 second to 12 hours, default 30 seconds; consumers can set it per request and extend it while they work). During this interval, the message remains hidden from other workers. If the worker processes the task successfully, it invokes DeleteMessage using the unique message receipt handle. If the worker crashes or times out before deletion, the visibility timeout expires, and the message automatically reappears in the queue for another worker to process.

Dead-Letter Queues (DLQ) : When a malformed message ("poison pill") repeatedly causes worker exceptions, retrying indefinitely would exhaust compute capacity and block queues. OCI Queue lets you set maximum delivery attempts from 1 to 20 at the queue level. A message delivered more times than that without being deleted moves to the queue's dead letter queue (DLQ) for investigation.

Retention and Size : Messages are kept until they are deleted or until the retention period expires (configurable from 10 seconds to 7 days, default 1 day). Messages can be up to 256 KB.

Channels and Consumer Groups : Channels are on-demand destinations inside a queue, so producers can publish to a specific channel and consumers can read from it (up to 256 channels per queue). Consumer groups let one queue fan out messages to several independent consuming applications.

Protocols : OCI Queue can be used through its REST API or the industry-standard STOMP protocol, and Connector Hub can move queue messages to Functions, Notifications, Object Storage, or Streaming.

Decision Framework: OCI Streaming vs. OCI Queue

Selecting between OCI Streaming and OCI Queue is a foundational architectural choice on the 1Z0-997-26 examination:

  • Evaluation Dimension OCI Streaming Service (OSS) OCI Queue
  • Core Paradigm Distributed Append-Only Event Log Point-to-Point Task Queue
  • Ordering Guarantee Strict total order within a partition Best-effort order across workers

Message Lifecycle Persists until retention expires (24 hours to 7 days) Kept until a consumer deletes it or retention (10 s to 7 days) expires

  • Consumption Model Consumer Groups tracking partition offsets Competing workers claiming individual tasks
  • Replayability Yes (can rewind offsets to re-read history) No (once deleted, messages are gone)
  • Capacity Planning Partition count fixed at creation (1 MB/s write per partition) No partitions to size
  • Failure Handling Consumer application manages error offsets Native Visibility Timeout & Dead-Letter Queue
  • Ecosystem Protocol Apache Kafka API (SASL/PLAIN) & OCI REST OCI REST API & STOMP protocol

Ideal Workloads IoT ingest, log aggregation, event sourcing, CQRS Batch jobs, PDF/image processing, decoupled tasks

Loading diagram... OCI Streaming Event Hub vs OCI Queue Worker Task Distribution