- Start rabbit mq server:
rabbitmq-server
- Access the web admin at
localhost:15672/
and login usingu= guest/p= guest
- Go to exchanges and click on add a new exchange- Give it a name(e.g. download-event), select fanout as type and durabilty to durable
- Go to queues and click on add a new queue- Give a name(e.g. download-image-event) and durability as durable
- Publish event message:
{"taskId":"569b34d1f79eae72524b4e96","title":"Quick image posts from my_images on 17 January 2016 at 12:29 PM (DHK - GMT+6)","channel":"facebook","createdAt":"2016-01-17T06:30:25.524Z","publishDate":"2016-01-17T06:32:18.167Z","articleGuids":[],"imageGuids":["4d4011c6799da7562111787e4e5fed97"],"organization":"53b8ccedab75641ba57e87c4","ssoId":"53b8cbf01f1582af1a00000f"}
- Download event message:
{imageGuid: <GUID of image in ThePlatform>, organizationId: <PK of CMC organization>, organizationName: <Name of organization to show in the dashboard>, downloadedAt: <ISO date of download from CMC>}
- Once you publish one type of message from respective queue(e.g. publish event message from publish-event queue) run the respective script from
reporting/workers/
folder(e.g.cmc_content_publish_event_listener
for publish-event queue) - Now go to
mysql -uroot
anduse reporting-service;
and then try looking up for the image guid you attach inimages
table
Created
February 9, 2016 09:26
-
-
Save itsmunim/b1bef6aef72b292b9dd8 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment