Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marco-faustinelli/b2d2d5ba8a3449758cec to your computer and use it in GitHub Desktop.
Save marco-faustinelli/b2d2d5ba8a3449758cec to your computer and use it in GitHub Desktop.
db.events.find({'type':'container-recorded'}).pretty()
{
"_id" : "ba238897-21eb-56a5-5ba5-53151af42652",
"type" : "container-recorded",
"data" : {
"meta" : {
"source" : "onebip",
"created_at" : ISODate("2015-01-07T12:30:29Z"),
"request_id" : "ba238897-21eb-56a5-5ba5-53151af42652",
"correlation_id" : "container/purchase/54ad26e41c85c4f97c7b2505",
"aggregate_id" : "purchase-54ad26e41c85c4f97c7b2505"
},
"payload" : [ ]
},
"received_at" : ISODate("2015-01-07T12:30:29.158Z")
}
> db.events.find({'type':'purchase-landed'}).pretty();
{
"_id" : "80c6b8b9-c32e-6cfd-0b42-b3828c431d81",
"type" : "purchase-landed",
"data" : {
"meta" : {
"source" : "onebip",
"created_at" : ISODate("2015-01-07T12:30:09Z"),
"request_id" : "80c6b8b9-c32e-6cfd-0b42-b3828c431d81",
"correlation_id" : "container/purchase/54ad26d11c85c4f57c7b2498",
"aggregate_id" : "purchase-54ad26d11c85c4f57c7b2498"
},
"payload" : {
"country" : "IT",
"merchant" : "[email protected]",
"context" : "web",
"device" : "desktop",
"user_agent" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36",
"ip" : "192.168.56.1",
"price" : "5.0000/EUR"
}
},
"received_at" : ISODate("2015-01-07T12:30:09.381Z")
}
> db.events.find({'type':'subscription-landed'}).pretty();
{
"_id" : "71a782c6-9b52-ea30-7d03-7c9903a2c412",
"type" : "subscription-landed",
"data" : {
"meta" : {
"source" : "onebip",
"created_at" : ISODate("2015-01-08T09:05:08Z"),
"request_id" : "71a782c6-9b52-ea30-7d03-7c9903a2c412",
"correlation_id" : "container/subscription/54ae48441c85c4360c7b2568",
"aggregate_id" : "subscription-54ae48441c85c4360c7b2568"
},
"payload" : {
"country" : "ES",
"merchant" : "[email protected]",
"context" : "web",
"device" : "desktop",
"user_agent" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36",
"ip" : "192.168.56.1",
"price" : "2.9000/EUR",
"service_id" : "5170d530f3e75a624c54105e"
}
},
"received_at" : ISODate("2015-01-08T09:05:08.707Z")
}
>
occorre poter filtrare per: country, merchant, type, date
output = containerId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment