Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions docs/sources/mongodb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# MongoDB Source

Consumes change events from a MongoDB collection.

With `tmctl`:

```
tmctl create source mongodb --connectionString mongodb://localhost:27017 --database <database> --collection <collection>
```


On Kubernetes:

```yaml
apiVersion: sources.triggermesh.io/v1alpha1
kind: MongoDBSource
metadata:
name: sample
spec:
connectionString: mongodb://localhost:27017
database: test-database
collection: test-collection
sink:
ref:
apiVersion: eventing.triggermesh.io/v1alpha1
kind: RedisBroker
name: triggermesh
```

Events produced have the following attributes:

* type: `io.triggermesh.mongodb.event`

See the [Kubernetes object reference](../../reference/sources/#sources.triggermesh.io/v1alpha1.MongoDBSource) for more details.

MongoDBSource will start when it can connect to the specified MongoDB instance. Controller logs and events can provide detailed information about the process. A Status summary is added to the MongoDBSource object informing of all the conditions that the source needs.

When ready, the status.ready will be `True`.

```shell
kubectl get mongodbsource
NAME READY REASON URL SINK AGE
sample True http://triggermesh.default.svc.cluster.local/namespace/default 1m
```

3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ nav:
- Google Cloud Pub/Sub: sources/googlecloudpubsub.md
- Google Cloud Repositories: sources/googlecloudrepositories.md
- Google Cloud Storage: sources/googlecloudstorage.md
- Kafka: sources/kafka.md
- HTTP Poller: sources/httppoller.md
- IBM MQ: sources/ibmmq.md
- Kafka: sources/kafka.md
- MongoDB: sources/mongodb.md
- OCIMetrics: sources/ocimetrics.md
- Salesforce: sources/salesforce.md
- Slack: sources/slack.md
Expand Down