Giter Club home page Giter Club logo

camel-mongodb's Introduction

camel-mongodb Project

====================

This project uses Camel with Mongodb. It connects to Mongo DB running in a docker container over port 27017 and queries data.

Mongo DB:

$ db
test

$ show dbs
local  0.000GB
test   0.000GB

$ db 
test

$ show collections
customers

$ db.customers.find().pretty();
{
	"_id" : ObjectId("569d417122a7ebef10c280af"),
	"name" : "Cust1",
	"address" : "addr1",
	"city" : "city1",
	"zip" : "00001"
}
{
	"_id" : ObjectId("569d418322a7ebef10c280b0"),
	"name" : "Cust2",
	"address" : "addr2",
	"city" : "city2",
	"zip" : "00002"
}

Main.java:

This program prints the data in collection customers

MongoDBFindAllRouteBuilder.java:

This has the route to findAll from Mongo DB collection

	from("timer://foo?repeatCount=1")
    .to("mongodb:myDb?database=test&collection=customers&operation=findAll")
    .process(new Processor() {
                public void process(Exchange exchange) throws Exception {
                    System.out.println("Find All:  " + exchange.getIn().toString());
                }
            })
   ;

camel-mongodb's People

Contributors

tuhingupta avatar

Stargazers

Oleg Ivashko avatar

Watchers

James Cloos avatar  avatar

Forkers

shijinraj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.