Registry / messaging / oci-streaming

oci-streaming

JSON →
library2.132.0jsnpmunverified

Official Oracle Cloud Infrastructure SDK for managing streaming resources (streams, stream pools, and messages) in OCI Streaming Service. Version 2.132.0 is part of the monorepo oci-typescript-sdk with weekly releases. Key differentiator: provides type-safe async/await APIs with native Oracle Cloud authentication (API keys, instance principals). Supports all CRUD operations for stream pools and streams, and message publishing/consuming via the streaming client. Requires Oracle Cloud account and proper IAM policies.

npm install oci-streaming
INSTALL
IMPORT
SIG · OCI-STREAMING
O
oci-streaming
messagingjavascriptv2.132.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

StreamClient
import { StreamClient } from 'oci-streaming'
const StreamClient = require('oci-streaming').StreamClient
SDK is ESM-only; requires importing directly. Use named imports.
models
import * as models from 'oci-streaming/lib/models'
import { models } from 'oci-streaming'
models is not exported at top level; must import from subpath. Also available via `import { PutMessagesDetails } from 'oci-streaming/lib/models'`.
StreamServiceClient
import { StreamServiceClient } from 'oci-streaming/lib/streamserviceclient'
import { StreamServiceClient } from 'oci-streaming'
StreamServiceClient is deprecated and not re-exported from top-level; use StreamClient for new code.

Initializes StreamClient with OCI configuration file credentials, lists all streams in a compartment.

import { StreamClient } from 'oci-streaming'; import { Region } from 'oci-common'; import { ConfigFileReader } from 'oci-common/lib/config-file-reader'; async function quickstart() { const configProfile = 'DEFAULT'; const config = ConfigFileReader.parseDefault(configProfile); const provider = new ConfigFileAuthenticationDetailsProvider(config); const client = new StreamClient({ authenticationDetailsProvider: provider }); client.region = Region.US_ASHBURN_1; const compartmentId = 'ocid1.compartment.oc1..example'; const streams = await client.listStreams({ compartmentId: compartmentId }); console.log(streams); } quickstart();
Debug
Known issues
breakingIn v2, authentication details provider must implement `AuthenticationDetailsProvider` interface; old v1 `ConfigFileAuthenticationDetailsProvider` constructor changed.
fix
Use `ConfigFileAuthenticationDetailsProvider` from `oci-common` with config file path or profile.
affects: >=2.0.0
gotchaStreamClient constructor requires `authenticationDetailsProvider` property; plain object without provider throws TypeError.
fix
Always include `authenticationDetailsProvider` in the constructor argument.
affects: >=2.0.0
deprecated`StreamServiceClient` is deprecated; use `StreamClient` instead.
fix
Replace `StreamServiceClient` with `StreamClient`.
affects: >=2.0.0
gotchaRegion must be set explicitly on the client; not inferred from config profile.
fix
Set `client.region = Region.US_ASHBURN_1` or use environment variable `OCI_REGION`.
affects: >=2.0.0
Errors
Common errors & fixes
TypeError: Cannot read properties of undefined (reading 'region')
StreamClient not instantiated with properties (missing `authenticationDetailsProvider`).
fix
Pass `{ authenticationDetailsProvider: provider }` to constructor.
Module not found: Can't resolve 'oci-streaming/lib/models'
Import path typo; models are not in top-level exports.
fix
Use correct import: `import { PutMessagesDetails } from 'oci-streaming/lib/models'`.
Error: Config file not found
Default config file location (~/.oci/config) missing or permissions issue.
fix
Ensure config file exists at `~/.oci/config` or use `ConfigFileReader.parse('path')`.
Upgrade
Version history
2.132.0latest on npm
Audit
Dependencies
oci-commonrequiredProvides authentication, HTTP transport, and common utilities required by all OCI service clients.
Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
oci-streaming — npm install oci-streaming · libregistry