Subscribing to MongoDB messages

All Consumer message actions require a body to be defined that is to subscribe to messages in the Collection in the MongoDB instance. You must select the transporter and formatter to subscribe to messages.


  1. Configure the Consumer message actions in the Subscribe window.
    image of the screen to set subscriber settings
  2. Select the Operation from the list. The Operation indicates how the messages interact with the database. Select from the following operations:
    Operation Description

    findById operation

    Fetches a single document from the database based on its document Id.
    Operation Description


    Explains that the Id of the document to be fetched from the database.


    Fetches a single document from the database based on query criteria.

    Operation Description


    Explains that a query in JSON form is used to fetch the desired document.


    Fetches all of the documents from a table. The documents fetched are limited by operation.

    Operation Description


    Discards a given number of documents at the beginning of the returned results before returning them.


    Limits the number of documents returned.


    Returns the number of documents in the specified collection. The returned value is a Long value represented as a String.


    Fetches the statistics about the specified database defined in the transport. Collection is not required.


    Fetches the statistics about the specified Collection from the database defined in the transport.


    Runs a command on the MongoDB instance specified in the transport.

    Operation Description
    Command Body

    Explains the command to run.

    The following example:

    {"hostInfo": 1}

    returns statistics about the host running the MongoDB instance.

  3. Specify a name for the Collection to be accessed. If you want to automatically create the collection if it does not exist, select the createCollection check box.