Previous Next JavaScript must be enabled to correctly display this content

## 5 Using a Streams Publisher

Each shard in the store publishes changes made to table data in the shard. Each of these publishing streams is combined into a single stream of table write operations, which the `oracle.kv.pubsub.NoSQLPublisher` class can access. This class constructs one or more `NoSQLSubscription` class objects, each of which can be used to manage a single subscription stream (where each subscription stream can include changes made to one or more tables in the store).

You configure `NoSQLPublisher` using `oracle.kv.pubsub.NoSQLPublisherConfig`, described next in this chapter. See Streams Example to see how the configuration is used within a streams application.

For any JVM, only one `NoSQLPublisher` instance can be created given identical `NoSQLPublisherConfig` objects. After creating an instance of `NoSQLPublisher`, the factory constructor returns the same instance of `NoSQLPublisher` for all subsequent construction requests, if the `NoSQLPublisherConfig` for those requests is identical.

Two `NoSQLPublisherConfig` objects are identical if all of the following information the same for both objects:

- Store name

- Shard timeout

- Maximum concurrent allowed subscriptions

- Security properties use identical username and credentials