[Backlogmanager] [FIWARE-JIRA] (HELP-19286) [fiware-stackoverflow] Multiple entities can' t be saved at same time in Mongo historical database

Fernando Lopez (JIRA) jira-help-desk at jira.fiware.org
Wed Mar 9 09:44:00 CET 2022


     [ https://jira.fiware.org/browse/HELP-19286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fernando Lopez resolved HELP-19286.
-----------------------------------
    Resolution: Done

> [fiware-stackoverflow] Multiple entities can't be saved at same time in Mongo historical database
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HELP-19286
>                 URL: https://jira.fiware.org/browse/HELP-19286
>             Project: Help-Desk
>          Issue Type: Monitor
>          Components: FIWARE-TECH-HELP
>            Reporter: Backlog Manager
>            Assignee: Fermín Galán
>              Labels: fiware, fiware-cygnus
>
> Created question in FIWARE Q/A platform on 03-03-2022 at 13:03
> {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/71338124/multiple-entities-cant-be-saved-at-same-time-in-mongo-historical-database
> +Question:+
> Multiple entities can't be saved at same time in Mongo historical database
> +Description:+
> I am trying to save multiple data entities in historical database, but only the first one from the array is saved in Mongo historical database.
> Below are the steps I performed.
> Docker-compose for Cygnus:
>  version: "3.8"
>  services:
>    cygnus:
>     hostname: cygnus
>     container_name: cygnus
>     image: fiware/cygnus-ngsi:2.16.0
>     networks:
>      - default_config
>     ports:
>      - "5080:5080"
>      - "5051:5051"
>     expose:
>      - "5051"
>      - "5080"
>     environment:
>      - CYGNUS_MONGO_SERVICE_PORT=5051
>      - CYGNUS_MONGO_HOSTS=mongo_db:27017
>      - CYGNUS_MONGO_USER=root
>      - CYGNUS_MONGO_PASS=root
>      - CYGNUS_MONGO_AUTH_SOURCE=admin
>      - CYGNUS_MONGO_DATA_MODEL=dm-by-service-path
>      - CYGNUS_MONGO_ATTR_PERSISTENCE=column
>      - CYGNUS_SERVICE_PORT=5051
>      - CYGNUS_API_PORT=5080
>      - CYGNUS_LOG_LEVEL=DEBUG
>      - CYGNUS_ORION_HOST=orion
>      - CYGNUS_ORION_PORT=1026
>      - CYGNUS_ORION_SSL=true
>  networks:
>    default_config:
>      external: true
> Create a Cygnus subscription:
> curl --location --request POST 'http://localhost1026/v2/subscriptions' \
> --header 'Content-Type: application/json' \
> --data-raw '{
>   "description": "Notify Cygnus Mongo-DB of all context changes",
>   "subject": {
>     "entities": [
>       {
>         "idPattern": ".*"
>       }
>     ]
>   },
>   "notification": {
>     "http": {
>       "url": "http://10.0.0.5:5051/notify"
>     }
>   },
>   "throttling": 5
> }'
> Batch Create a New Data Entity :
> curl --location --request POST 'http://localhost:1026/v2/op/update/' \
> --header 'Content-Type: application/json' \
> --data-raw '{
>   "actionType":"append_strict",
>   "entities":[
>     {
>       "id":"urn:ngsi-ld:Product:100", "type":"Product",
>       "name":{"type":"Text", "value":"Brandy"},
>       "size":{"type":"Text", "value": "M"},
>       "price":{"type":"Integer", "value": 1199}
>     },
>     {
>       "id":"urn:ngsi-ld:Product:101", "type":"Product",
>       "name":{"type":"Text", "value":"Port"},
>       "size":{"type":"Text", "value": "M"},
>       "price":{"type":"Integer", "value": 1099}
>     }
>   ]
> }'
> Result in Mongo:
> Group updates also do not work.
> Did I miss something in the configuration or there is no possibility for that in Cygnus?
> Thank you in advance.



--
This message was sent by Atlassian JIRA
(v6.4.1#64016)


More information about the Backlogmanager mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy